summaryrefslogtreecommitdiffstats
path: root/views/controls/table/native_table_win.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-05 19:05:07 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-05 19:05:07 +0000
commitbe172ba8194e48970d90e9d873160b259df69b96 (patch)
tree677a1fedc8a836a42de1dba22d8c0663173a0f96 /views/controls/table/native_table_win.cc
parent2c572bd1d4eec134ae40e00adbfa2c9d3d1ff1e7 (diff)
downloadchromium_src-be172ba8194e48970d90e9d873160b259df69b96.zip
chromium_src-be172ba8194e48970d90e9d873160b259df69b96.tar.gz
chromium_src-be172ba8194e48970d90e9d873160b259df69b96.tar.bz2
Allow CanvasSkia to bind to an existing SkCanvas.
BUG=None TEST=None Review URL: http://codereview.chromium.org/8122013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/table/native_table_win.cc')
-rw-r--r--views/controls/table/native_table_win.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/views/controls/table/native_table_win.cc b/views/controls/table/native_table_win.cc
index 6f8472c..91d46c9 100644
--- a/views/controls/table/native_table_win.cc
+++ b/views/controls/table/native_table_win.cc
@@ -395,7 +395,7 @@ void NativeTableWin::CreateNativeControl() {
// rect does not include the icon).
gfx::CanvasSkia canvas(kImageSize, kImageSize, false);
// Make the background completely transparent.
- canvas.drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ canvas.sk_canvas()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
{
base::win::ScopedHICON empty_icon(
IconUtil::CreateHICONFromSkBitmap(canvas.ExtractBitmap()));
@@ -533,7 +533,7 @@ LRESULT NativeTableWin::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
// NOTE: This may be invoked without the ListView filling in the
// background (or rather windows paints background, then invokes
// this twice). As such, we always fill in the background.
- canvas.drawColor(
+ canvas.sk_canvas()->drawColor(
skia::COLORREFToSkColor(GetSysColor(bg_color_index)),
SkXfermode::kSrc_Mode);
// + 1 for padding (we declared the image as 18x18 in the list-
@@ -551,9 +551,9 @@ LRESULT NativeTableWin::OnCustomDraw(NMLVCUSTOMDRAW* draw_info) {
(intersection.right - intersection.left);
to_draw.bottom = to_draw.top +
(intersection.bottom - intersection.top);
- skia::DrawToNativeContext(&canvas, draw_info->nmcd.hdc,
- intersection.left, intersection.top,
- &to_draw);
+ skia::DrawToNativeContext(canvas.sk_canvas(), draw_info->nmcd.hdc,
+ intersection.left, intersection.top,
+ &to_draw);
r = CDRF_SKIPDEFAULT;
}
}