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

Unified Diff: ui/compositor/dip_util.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 years, 3 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/compositor/dip_util.cc
diff --git a/ui/compositor/dip_util.cc b/ui/compositor/dip_util.cc
index 62e995f3c6792293978f8bb80dc13920357cbc66..13930518543c8e6230496c91444a5e678879b23e 100644
--- a/ui/compositor/dip_util.cc
+++ b/ui/compositor/dip_util.cc
@@ -84,7 +84,7 @@ void SnapLayerToPhysicalPixelBoundary(ui::Layer* snapped_layer,
gfx::Point view_offset_dips = layer_to_snap->GetTargetBounds().origin();
ui::Layer::ConvertPointToLayer(
layer_to_snap->parent(), snapped_layer, &view_offset_dips);
- gfx::PointF view_offset = view_offset_dips;
+ auto view_offset = gfx::PointF(view_offset_dips);
float scale_factor = GetDeviceScaleFactor(layer_to_snap);
view_offset.Scale(scale_factor);
@@ -100,7 +100,7 @@ void SnapLayerToPhysicalPixelBoundary(ui::Layer* snapped_layer,
Layer::ConvertPointToLayer(
layer_to_snap->parent(), snapped_layer, &layer_offset);
if (layer_to_snap->GetAnimator()->is_animating()) {
- origin = layer_to_snap->GetTargetBounds().origin() +
+ origin = gfx::PointF(layer_to_snap->GetTargetBounds().origin()) +
layer_to_snap->subpixel_position_offset();
} else {
origin = layer_to_snap->position();

Powered by Google App Engine
This is Rietveld 408576698