Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1613)

Unified Diff: views/controls/tree/tree_view.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/controls/tree/tree_view.cc
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc
index 078ee20ea719784836e746f5d108d04232d43329..80313ed64840b54b2e603770a3a56c9b763ae527 100644
--- a/views/controls/tree/tree_view.cc
+++ b/views/controls/tree/tree_view.cc
@@ -699,7 +699,7 @@ HIMAGELIST TreeView::CreateImageList() {
model_images[i].height() != height) {
gfx::CanvasSkia canvas(width, height, false);
// Make the background completely transparent.
- canvas.drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ canvas.sk_canvas()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
// Draw our icons into this canvas.
int height_offset = (height - model_images[i].height()) / 2;
@@ -752,7 +752,7 @@ LRESULT CALLBACK TreeView::TreeWndProc(HWND window,
if (canvas.isEmpty())
return 0;
- HDC dc = skia::BeginPlatformPaint(&canvas);
+ HDC dc = skia::BeginPlatformPaint(canvas.sk_canvas());
if (base::i18n::IsRTL()) {
// gfx::CanvasSkia ends up configuring the DC with a mode of
// GM_ADVANCED. For some reason a graphics mode of ADVANCED triggers
@@ -786,7 +786,7 @@ LRESULT CALLBACK TreeView::TreeWndProc(HWND window,
// over we copy the right bits.
SetViewportOrgEx(dc, 0, 0, NULL);
}
- skia::EndPlatformPaint(&canvas);
+ skia::EndPlatformPaint(canvas.sk_canvas());
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698