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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScrollOffset instead of vector2dF for scroll offset Created 6 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: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 07dc6c8f51558136e5ddf376f71f8f5c274b45df..2ed520de31f8c4c5ecabe6997a26433562f3dcfd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2616,7 +2616,7 @@ bool LayerTreeHostImpl::ScrollBy(const gfx::Point& viewport_point,
float angle_threshold = 45;
if (MathUtil::SmallestAngleBetweenVectors(
applied_delta, pending_delta) < angle_threshold) {
- pending_delta = gfx::Vector2d();
+ pending_delta = gfx::Vector2dF();
break;
}
@@ -2917,8 +2917,8 @@ static void CollectScrollDeltas(ScrollAndScaleSet* scroll_info,
if (!layer_impl)
return;
- gfx::Vector2d scroll_delta =
- gfx::ToFlooredVector2d(layer_impl->ScrollDelta());
+ gfx::ScrollOffset scroll_delta(layer_impl->ScrollDelta().x(),
+ layer_impl->ScrollDelta().y());
if (!scroll_delta.IsZero()) {
LayerTreeHostCommon::ScrollUpdateInfo scroll;
scroll.layer_id = layer_impl->id();

Powered by Google App Engine
This is Rietveld 408576698