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

Unified Diff: views/drag_utils.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/controls/tree/tree_view.cc ('k') | views/native_theme_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/drag_utils.cc
===================================================================
--- views/drag_utils.cc (revision 82144)
+++ views/drag_utils.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -49,7 +49,8 @@
button.SetBounds(0, 0, prefsize.width(), prefsize.height());
// Render the image.
- gfx::CanvasSkia canvas(prefsize.width(), prefsize.height(), false);
+ gfx::CanvasSkia canvas;
+ canvas.Init(prefsize.width(), prefsize.height(), false);
button.PaintButton(&canvas, views::TextButton::PB_FOR_DRAG);
SetDragImageOnDataObject(canvas, prefsize,
gfx::Point(prefsize.width() / 2, prefsize.height() / 2), data);
@@ -69,7 +70,8 @@
// Add +2 here to allow room for the halo.
const int height = font.GetHeight() + icon->height() +
kLinkDragImageVPadding + 2;
- gfx::CanvasSkia canvas(width, height, false /* translucent */);
+ gfx::CanvasSkia canvas;
+ canvas.Init(width, height, false /* translucent */);
// Paint the icon.
canvas.DrawBitmapInt(*icon, (width - icon->width()) / 2, 0);
« no previous file with comments | « views/controls/tree/tree_view.cc ('k') | views/native_theme_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698