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

Unified Diff: ui/compositor/dip_util.cc

Issue 391343009: Use gfx::ToRoundedInt instead of cc::MathUtil::Round (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/dip_util.cc
diff --git a/ui/compositor/dip_util.cc b/ui/compositor/dip_util.cc
index 353cee31198d3688784d493e5aea941a01706163..2966154b758d061b0adb64e650b21c062b91499b 100644
--- a/ui/compositor/dip_util.cc
+++ b/ui/compositor/dip_util.cc
@@ -5,12 +5,12 @@
#include "ui/compositor/dip_util.h"
#include "base/command_line.h"
-#include "cc/base/math_util.h"
#include "cc/layers/layer.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/compositor_switches.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/display.h"
+#include "ui/gfx/geometry/safe_integer_conversions.h"
#include "ui/gfx/point.h"
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/rect.h"
@@ -97,8 +97,8 @@ void SnapLayerToPhysicalPixelBoundary(ui::Layer* snapped_layer,
float scale_factor = GetDeviceScaleFactor(layer_to_snap);
view_offset.Scale(scale_factor);
- gfx::PointF view_offset_snapped(cc::MathUtil::Round(view_offset.x()),
- cc::MathUtil::Round(view_offset.y()));
+ gfx::PointF view_offset_snapped(gfx::ToRoundedInt(view_offset.x()),
+ gfx::ToRoundedInt(view_offset.y()));
gfx::Vector2dF fudge = view_offset_snapped - view_offset;
fudge.Scale(1.0 / scale_factor);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698