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

Unified Diff: views/controls/menu/menu_separator_win.cc

Issue 2825018: Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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_separator_win.cc
===================================================================
--- views/controls/menu/menu_separator_win.cc (revision 50661)
+++ views/controls/menu/menu_separator_win.cc (working copy)
@@ -8,7 +8,7 @@
#include <uxtheme.h>
#include <Vssym32.h>
-#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/native_theme_win.h"
#include "views/controls/menu/menu_config.h"
#include "views/controls/menu/menu_item_view.h"
@@ -20,7 +20,7 @@
// The gutter is rendered before the background.
int start_x = 0;
int start_y = height() / 3;
- HDC dc = canvas->beginPlatformPaint();
+ HDC dc = canvas->AsCanvasSkia()->beginPlatformPaint();
if (config.render_gutter) {
// If render_gutter is true, we're on Vista and need to render the
// gutter, then indent the separator from the gutter.
@@ -36,7 +36,7 @@
RECT separator_bounds = { start_x, start_y, width(), height() };
gfx::NativeTheme::instance()->PaintMenuSeparator(
dc, MENU_POPUPSEPARATOR, MPI_NORMAL, &separator_bounds);
- canvas->endPlatformPaint();
+ canvas->AsCanvasSkia()->endPlatformPaint();
}
gfx::Size MenuSeparator::GetPreferredSize() {

Powered by Google App Engine
This is Rietveld 408576698