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

Unified Diff: ui/views/drag_utils.cc

Issue 2694023003: Make CanvasPainter raster directly to an SkBitmap (Closed)
Patch Set: tapted review Created 3 years, 10 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 | « ui/views/drag_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/drag_utils.cc
diff --git a/ui/views/drag_utils.cc b/ui/views/drag_utils.cc
index f9e6c8be5ab607d7122bca1385181057e1780f2a..dc068c54fd8a8bae1c8fa35df2a09eedfa01b14f 100644
--- a/ui/views/drag_utils.cc
+++ b/ui/views/drag_utils.cc
@@ -10,9 +10,9 @@
#include "ui/gfx/geometry/size.h"
#include "ui/views/widget/widget.h"
-namespace {
+namespace views {
-float GetDeviceScaleForNativeView(views::Widget* widget) {
+float ScaleFactorForDragFromWidget(Widget* widget) {
float device_scale = 1.0f;
if (widget && widget->GetNativeView()) {
gfx::NativeView view = widget->GetNativeView();
@@ -23,13 +23,9 @@ float GetDeviceScaleForNativeView(views::Widget* widget) {
return device_scale;
}
-} // namespace
-
-namespace views {
-
-gfx::Canvas* GetCanvasForDragImage(views::Widget* widget,
+gfx::Canvas* GetCanvasForDragImage(Widget* widget,
const gfx::Size& canvas_size) {
- float device_scale = GetDeviceScaleForNativeView(widget);
+ float device_scale = ScaleFactorForDragFromWidget(widget);
return new gfx::Canvas(canvas_size, device_scale, false);
}
« no previous file with comments | « ui/views/drag_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698