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

Unified Diff: ui/views/controls/menu/menu_win.cc

Issue 10696130: Get rid of implicit conversion to and from ImageSkiaRep (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « ui/gfx/image/image_skia_rep.cc ('k') | ui/views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_win.cc
diff --git a/ui/views/controls/menu/menu_win.cc b/ui/views/controls/menu/menu_win.cc
index 736a7ed634b7a47c3664e91ece2c34c09e4996e6..b473d5c8ca7a68d9727627100cac3b257011b204 100644
--- a/ui/views/controls/menu/menu_win.cc
+++ b/ui/views/controls/menu/menu_win.cc
@@ -183,8 +183,10 @@ class MenuHostWindow : public ui::WindowImpl {
// Draw the icon after the label, otherwise it would be covered
// by the label.
+ gfx::ImageSkiaRep icon_image_rep =
+ data->icon.GetRepresentation(ui::SCALE_FACTOR_100P);
if (data->icon.width() != 0 && data->icon.height() != 0) {
- gfx::Canvas canvas(data->icon, false);
+ gfx::Canvas canvas(icon_image_rep, false);
skia::DrawToNativeContext(
canvas.sk_canvas(), hDC, lpdis->rcItem.left + kItemLeftMargin,
lpdis->rcItem.top + (lpdis->rcItem.bottom - lpdis->rcItem.top -
« no previous file with comments | « ui/gfx/image/image_skia_rep.cc ('k') | ui/views/controls/menu/native_menu_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698