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

Unified Diff: ui/views/button_drag_utils.cc

Issue 2877483003: Implements core logic for Pixel Canvas (Closed)
Patch Set: Update tests Created 3 years, 5 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
Index: ui/views/button_drag_utils.cc
diff --git a/ui/views/button_drag_utils.cc b/ui/views/button_drag_utils.cc
index 064a133d2691b4f59520840cc3ad5e3a4af249b9..0db41f11be446e2de6c01588e8c1e193407d67e0 100644
--- a/ui/views/button_drag_utils.cc
+++ b/ui/views/button_drag_utils.cc
@@ -8,6 +8,8 @@
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/compositor/canvas_painter.h"
+#include "ui/compositor/paint_context.h"
+#include "ui/compositor/paint_info.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/vector2d.h"
@@ -83,7 +85,8 @@ void SetDragImage(const GURL& url,
SkBitmap bitmap;
float raster_scale = ScaleFactorForDragFromWidget(&widget);
SkColor color = SK_ColorTRANSPARENT;
- button.Paint(ui::CanvasPainter(&bitmap, size, raster_scale, color).context());
+ button.Paint(ui::PaintInfo(
+ ui::CanvasPainter(&bitmap, size, raster_scale, color).context(), size));
gfx::ImageSkia image(gfx::ImageSkiaRep(bitmap, raster_scale));
data->provider().SetDragImage(image, press_point);
}

Powered by Google App Engine
This is Rietveld 408576698