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_unittest.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_unittest.cc')
-rw-r--r-- | views/view_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/views/view_unittest.cc b/views/view_unittest.cc index b5e1091..9c0a2b8 100644 --- a/views/view_unittest.cc +++ b/views/view_unittest.cc @@ -8,7 +8,7 @@ #include "base/keyboard_codes.h" #include "base/message_loop.h" #include "base/string_util.h" -#include "gfx/canvas.h" +#include "gfx/canvas_skia.h" #include "gfx/path.h" #include "testing/gtest/include/gtest/gtest.h" #include "views/background.h" @@ -81,7 +81,7 @@ void PaintRootView(views::RootView* root, bool empty_paint) { // User isn't logged in, so that PaintNow will generate an empty rectangle. // Invoke paint directly. gfx::Rect paint_rect = root->GetScheduledPaintRect(); - gfx::Canvas canvas(paint_rect.width(), paint_rect.height(), true); + gfx::CanvasSkia canvas(paint_rect.width(), paint_rect.height(), true); canvas.TranslateInt(-paint_rect.x(), -paint_rect.y()); canvas.ClipRectInt(0, 0, paint_rect.width(), paint_rect.height()); root->ProcessPaint(&canvas); @@ -387,7 +387,7 @@ TEST_F(ViewTest, MouseEvent) { //////////////////////////////////////////////////////////////////////////////// void TestView::Paint(gfx::Canvas* canvas) { - canvas->getClipBounds(&last_clip_); + canvas->AsCanvasSkia()->getClipBounds(&last_clip_); } void CheckRect(const SkRect& check_rect, const SkRect& target_rect) { |