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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO 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
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 84b164418ec398c37a0d4f6ea83a0ef622224b36..1c66185e9a91a79c6a761c3ee3e4e8ea6bbcd0cd 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1085,8 +1085,9 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
} else if (layer == inner_viewport_scroll_layer_.get()) {
inner_viewport_scroll_delta += info->scrolls[i].scroll_delta;
} else {
- layer->SetScrollOffsetFromImplSide(layer->scroll_offset() +
- info->scrolls[i].scroll_delta);
+ layer->SetScrollOffsetFromImplSide(
+ gfx::ScrollOffsetWithDelta(layer->scroll_offset(),
+ info->scrolls[i].scroll_delta));
}
}
@@ -1103,12 +1104,14 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
// it to the client. If the client comes back and sets it to the same
// value, then the layer can early out without needing a full commit.
inner_viewport_scroll_layer_->SetScrollOffsetFromImplSide(
- inner_viewport_scroll_layer_->scroll_offset() +
- inner_viewport_scroll_delta);
+ gfx::ScrollOffsetWithDelta(
+ inner_viewport_scroll_layer_->scroll_offset(),
+ inner_viewport_scroll_delta));
if (outer_viewport_scroll_layer_.get()) {
outer_viewport_scroll_layer_->SetScrollOffsetFromImplSide(
- outer_viewport_scroll_layer_->scroll_offset() +
- outer_viewport_scroll_delta);
+ gfx::ScrollOffsetWithDelta(
+ outer_viewport_scroll_layer_->scroll_offset(),
+ outer_viewport_scroll_delta));
}
ApplyPageScaleDeltaFromImplSide(info->page_scale_delta);
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698