diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 16:33:23 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 16:33:23 +0000 |
commit | 74db48eb22cd8bfe4d028418d99e7aee6c220930 (patch) | |
tree | 94b62cc97d669cb965d2073c5d9a72a4a3c3ee04 /views/view.cc | |
parent | 2abd00dd89a5cbc9af4a88a59269fdf9f988cf12 (diff) | |
download | chromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.zip chromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.tar.gz chromium_src-74db48eb22cd8bfe4d028418d99e7aee6c220930.tar.bz2 |
Canvas refactoring part 3.
- Replace Canvas instance users with CanvasSkia users.
- Rename Canvas2 to Canvas.
- Delete Canvas subclass of CanvasSkia.
This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API.
BUG=none
TEST=none
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/views/view.cc b/views/view.cc index d8ba4c3..e2d4e43 100644 --- a/views/view.cc +++ b/views/view.cc @@ -14,7 +14,7 @@ #include "base/message_loop.h" #include "base/scoped_handle.h" #include "base/utf_string_conversions.h" -#include "gfx/canvas.h" +#include "gfx/canvas_skia.h" #include "gfx/path.h" #include "third_party/skia/include/core/SkShader.h" #include "views/background.h" @@ -378,7 +378,7 @@ void View::ProcessPaint(gfx::Canvas* canvas) { return; // We're going to modify the canvas, save it's state first. - canvas->save(); + canvas->AsCanvasSkia()->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 @@ void View::ProcessPaint(gfx::Canvas* canvas) { canvas->TranslateInt(MirroredX(), y()); // Save the state again, so that any changes don't effect PaintChildren. - canvas->save(); + canvas->AsCanvasSkia()->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 @@ void View::ProcessPaint(gfx::Canvas* canvas) { if (flip_canvas) { canvas->TranslateInt(width(), 0); canvas->ScaleInt(-1, 1); - canvas->save(); + canvas->AsCanvasSkia()->save(); } Paint(canvas); @@ -410,14 +410,14 @@ void View::ProcessPaint(gfx::Canvas* canvas) { // 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->restore(); + canvas->AsCanvasSkia()->restore(); - canvas->restore(); + canvas->AsCanvasSkia()->restore(); PaintChildren(canvas); } // Restore the canvas's original transform. - canvas->restore(); + canvas->AsCanvasSkia()->restore(); } void View::PaintNow() { |