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

Unified Diff: views/view.cc

Issue 2811032: Revert 50784 - 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
« no previous file with comments | « views/painter.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
===================================================================
--- views/view.cc (revision 50789)
+++ views/view.cc (working copy)
@@ -14,7 +14,7 @@
#include "base/message_loop.h"
#include "base/scoped_handle.h"
#include "base/utf_string_conversions.h"
-#include "gfx/canvas_skia.h"
+#include "gfx/canvas.h"
#include "gfx/path.h"
#include "third_party/skia/include/core/SkShader.h"
#include "views/background.h"
@@ -378,7 +378,7 @@
return;
// We're going to modify the canvas, save it's state first.
- canvas->AsCanvasSkia()->save();
+ canvas->save();
// Paint this View and its children, setting the clip rect to the bounds
// of this View and translating the origin to the local bounds' top left
@@ -393,7 +393,7 @@
canvas->TranslateInt(MirroredX(), y());
// Save the state again, so that any changes don't effect PaintChildren.
- canvas->AsCanvasSkia()->save();
+ canvas->save();
// If the View we are about to paint requested the canvas to be flipped, we
// should change the transform appropriately.
@@ -401,7 +401,7 @@
if (flip_canvas) {
canvas->TranslateInt(width(), 0);
canvas->ScaleInt(-1, 1);
- canvas->AsCanvasSkia()->save();
+ canvas->save();
}
Paint(canvas);
@@ -410,14 +410,14 @@
// we don't pass the canvas with the mirrored transform to Views that
// didn't request the canvas to be flipped.
if (flip_canvas)
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
PaintChildren(canvas);
}
// Restore the canvas's original transform.
- canvas->AsCanvasSkia()->restore();
+ canvas->restore();
}
void View::PaintNow() {
« no previous file with comments | « views/painter.cc ('k') | views/view_text_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698