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

Unified Diff: views/controls/menu/menu_item_view_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_item_view_win.cc
diff --git a/views/controls/menu/menu_item_view_win.cc b/views/controls/menu/menu_item_view_win.cc
index cea5c4c7cb06dfd2a7782a235f25a4c38f9b9f27..9e04cdc5125625c9c7a1fd31c761d665ef3ef5b9 100644
--- a/views/controls/menu/menu_item_view_win.cc
+++ b/views/controls/menu/menu_item_view_win.cc
@@ -66,7 +66,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
height());
AdjustBoundsForRTLUI(&gutter_bounds);
NativeTheme::ExtraParams extra;
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuPopupGutter,
NativeTheme::kNormal,
gutter_bounds,
@@ -79,7 +79,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
NativeTheme::ExtraParams extra;
extra.menu_item.is_selected = render_selection;
AdjustBoundsForRTLUI(&item_bounds);
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuItemBackground, control_state, item_bounds, extra);
}
@@ -144,7 +144,7 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
gfx::NativeTheme::ExtraParams extra;
extra.menu_arrow.pointing_right = !base::i18n::IsRTL();
extra.menu_arrow.is_selected = render_selection;
- gfx::NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ gfx::NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
gfx::NativeTheme::kMenuPopupArrow, control_state, arrow_bounds, extra);
}
}
@@ -174,13 +174,13 @@ void MenuItemView::PaintCheck(gfx::Canvas* canvas,
// Draw the background.
gfx::Rect bg_bounds(0, 0, icon_x + icon_width, height());
AdjustBoundsForRTLUI(&bg_bounds);
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuCheckBackground, state, bg_bounds, extra);
// And the check.
gfx::Rect icon_bounds(icon_x / 2, icon_y, icon_width, icon_height);
AdjustBoundsForRTLUI(&icon_bounds);
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuCheck, state, bg_bounds, extra);
}

Powered by Google App Engine
This is Rietveld 408576698