From a219f823813abcf778eceea2eb81f2d3967009a8 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 24 Jun 2010 23:30:26 +0000 Subject: 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 Review URL: http://codereview.chromium.org/2825018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50784 0039d316-1c4b-4281-b951-d872f2087c98 --- views/drag_utils.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'views/drag_utils.cc') diff --git a/views/drag_utils.cc b/views/drag_utils.cc index 8fbd79a..0b5ffa0 100644 --- a/views/drag_utils.cc +++ b/views/drag_utils.cc @@ -10,7 +10,6 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/utf_string_conversions.h" -#include "gfx/canvas.h" #include "gfx/canvas_skia.h" #include "gfx/font.h" #include "googleurl/src/gurl.h" @@ -49,8 +48,7 @@ void SetURLAndDragImage(const GURL& url, button.SetBounds(0, 0, prefsize.width(), prefsize.height()); // Render the image. - // TODO(beng): Convert to CanvasSkia - gfx::Canvas canvas(prefsize.width(), prefsize.height(), false); + gfx::CanvasSkia canvas(prefsize.width(), prefsize.height(), false); button.Paint(&canvas, true); SetDragImageOnDataObject(canvas, prefsize, gfx::Point(prefsize.width() / 2, prefsize.height() / 2), data); @@ -70,8 +68,7 @@ void CreateDragImageForFile(const FilePath::StringType& file_name, // Add +2 here to allow room for the halo. const int height = font.height() + icon->height() + kLinkDragImageVPadding + 2; - // TODO(beng): Convert to CanvasSkia - gfx::Canvas canvas(width, height, false /* translucent */); + gfx::CanvasSkia canvas(width, height, false /* translucent */); // Paint the icon. canvas.DrawBitmapInt(*icon, (width - icon->width()) / 2, 0); -- cgit v1.1