diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 22:08:44 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-29 22:08:44 +0000 |
commit | bd026803b2a3db66f2003f83c4b7e627c71828a2 (patch) | |
tree | e45b18ae05095ffae9201fe8ec905bf1fef25e50 /views/view.cc | |
parent | 6a649b71db4df80493abfb125e0a71738d4d9d8a (diff) | |
download | chromium_src-bd026803b2a3db66f2003f83c4b7e627c71828a2.zip chromium_src-bd026803b2a3db66f2003f83c4b7e627c71828a2.tar.gz chromium_src-bd026803b2a3db66f2003f83c4b7e627c71828a2.tar.bz2 |
Canvas refactoring Phase 4a:
Move Save, SaveLayerAlpha and Restore onto gfx::Canvas.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2846035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/views/view.cc b/views/view.cc index e2d4e43..90fb2bc 100644 --- a/views/view.cc +++ b/views/view.cc @@ -378,7 +378,7 @@ void View::ProcessPaint(gfx::Canvas* canvas) { 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 @@ void View::ProcessPaint(gfx::Canvas* canvas) { 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 @@ void View::ProcessPaint(gfx::Canvas* canvas) { if (flip_canvas) { canvas->TranslateInt(width(), 0); canvas->ScaleInt(-1, 1); - canvas->AsCanvasSkia()->save(); + canvas->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->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() { |