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

Unified Diff: ui/gfx/canvas_paint_gtk.cc

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/canvas.cc ('k') | ui/gfx/canvas_paint_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/canvas_paint_gtk.cc
===================================================================
--- ui/gfx/canvas_paint_gtk.cc (revision 167659)
+++ ui/gfx/canvas_paint_gtk.cc (working copy)
@@ -52,13 +52,10 @@
void CanvasSkiaPaint::Init(bool opaque) {
GdkRectangle bounds = rectangle();
+ RecreateBackingCanvas(gfx::Size(bounds.width, bounds.height),
+ ui::SCALE_FACTOR_100P, opaque);
+
skia::PlatformCanvas* canvas = platform_canvas();
- if (!canvas->initialize(bounds.width, bounds.height, opaque, NULL)) {
- // Cause a deliberate crash;
- CHECK(false);
- }
- // No need to clear the canvas, because cairo automatically performs the
- // clear.
// Need to translate so that the dirty region appears at the origin of the
// surface.
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/canvas_paint_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698