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

Unified Diff: views/controls/menu/menu_win.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/menu/menu_win.cc
diff --git a/views/controls/menu/menu_win.cc b/views/controls/menu/menu_win.cc
index 5c1d487c0aca84db5e341a3c0780174121499ddc..031f4fe01636af6a0ab1f5618d435e1698507f66 100644
--- a/views/controls/menu/menu_win.cc
+++ b/views/controls/menu/menu_win.cc
@@ -186,10 +186,10 @@ class MenuHostWindow : public ui::WindowImpl {
// by the label.
if (data->icon.width() != 0 && data->icon.height() != 0) {
gfx::CanvasSkia canvas(data->icon.width(), data->icon.height(), false);
- canvas.drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
+ canvas.sk_canvas()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
canvas.DrawBitmapInt(data->icon, 0, 0);
skia::DrawToNativeContext(
- &canvas, hDC, lpdis->rcItem.left + kItemLeftMargin,
+ canvas.sk_canvas(), hDC, lpdis->rcItem.left + kItemLeftMargin,
lpdis->rcItem.top + (lpdis->rcItem.bottom - lpdis->rcItem.top -
data->icon.height()) / 2, NULL);
}

Powered by Google App Engine
This is Rietveld 408576698