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

Unified Diff: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 2862025: Canvas refactoring part 2.... (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: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (revision 50452)
+++ chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -16,6 +16,7 @@
#include "chrome/browser/views/bubble_border.h"
#include "chrome/browser/views/location_bar/location_bar_view.h"
#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/color_utils.h"
#include "gfx/insets.h"
#include "gfx/path.h"
@@ -764,14 +765,14 @@
// Instead, we paint all our children into a second canvas and use that as a
// shader to fill a path representing the round-rect clipping region. This
// yields a nice anti-aliased edge.
- gfx::Canvas contents_canvas(width(), height(), true);
+ gfx::CanvasSkia contents_canvas(width(), height(), true);
contents_canvas.drawColor(GetColor(NORMAL, BACKGROUND));
- View::PaintChildren(&contents_canvas);
+ View::PaintChildren(contents_canvas.AsCanvas());
// We want the contents background to be slightly transparent so we can see
// the blurry glass effect on DWM systems behind. We do this _after_ we paint
// the children since they paint text, and GDI will reset this alpha data if
// we paint text after this call.
- MakeCanvasTransparent(&contents_canvas);
+ MakeCanvasTransparent(contents_canvas.AsCanvas());
// Now paint the contents of the contents canvas into the actual canvas.
SkPaint paint;
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/browser/views/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698