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

Unified Diff: views/controls/menu/menu_scroll_view_container.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_scroll_view_container.cc
diff --git a/views/controls/menu/menu_scroll_view_container.cc b/views/controls/menu/menu_scroll_view_container.cc
index 1d3fcdd3a46b50e5450be678a12b3d6e0e0a8afa..cb52b41ed60dd598fe057547ec30e419cdcfb86d 100644
--- a/views/controls/menu/menu_scroll_view_container.cc
+++ b/views/controls/menu/menu_scroll_view_container.cc
@@ -86,7 +86,7 @@ class MenuScrollButton : public View {
gfx::Rect item_bounds(0, 0, width(), height());
NativeTheme::ExtraParams extra;
extra.menu_item.is_selected = false;
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuItemBackground,
NativeTheme::kNormal, item_bounds, extra);
SkColor arrow_color = color_utils::GetSysSkColor(COLOR_MENUTEXT);
@@ -186,7 +186,7 @@ void MenuScrollViewContainer::OnPaintBackground(gfx::Canvas* canvas) {
HDC dc = canvas->BeginPlatformPaint();
gfx::Rect bounds(0, 0, width(), height());
NativeTheme::ExtraParams extra;
- NativeTheme::instance()->Paint(canvas->AsCanvasSkia(),
+ NativeTheme::instance()->Paint(canvas->GetSkCanvas(),
NativeTheme::kMenuPopupBackground, NativeTheme::kNormal, bounds, extra);
canvas->EndPlatformPaint();
#elif defined(OS_CHROMEOS)
@@ -219,8 +219,8 @@ void MenuScrollViewContainer::OnPaintBackground(gfx::Canvas* canvas) {
canvas->DrawRectInt(0, 0, width(), height(), paint);
#else
// This is the same as COLOR_TOOLBAR.
- canvas->AsCanvasSkia()->drawColor(SkColorSetRGB(210, 225, 246),
- SkXfermode::kSrc_Mode);
+ canvas->GetSkCanvas()->drawColor(SkColorSetRGB(210, 225, 246),
+ SkXfermode::kSrc_Mode);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698