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); |