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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 256303006: Make LayerScrollOffsetDelegate updates consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build break Created 6 years, 7 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/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e158759cc21ef7ac575b6bec2ffeb86aa9490a65..d00faf0e8240e367efee64f1476c034720d79d1e 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2685,6 +2685,11 @@ void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta,
TRACE_EVENT0("cc", "LayerTreeHostImpl::PinchGestureUpdate");
+ // For a moment the scroll offset ends up being outside of the max range. This
+ // confuses the delegate so we switch it off till after we're done processing
+ // the pinch update.
+ active_tree_->SetRootLayerScrollOffsetDelegate(NULL);
aelias_OOO_until_Jul13 2014/05/09 01:00:01 Is there any way to avoid this workaround by chang
mkosiba (inactive) 2014/05/09 17:05:33 AFAICT the problem is caused by 2 things: a) the L
+
// Keep the center-of-pinch anchor specified by (x, y) in a stable
// position over the course of the magnify.
float page_scale_delta = active_tree_->page_scale_delta();
@@ -2718,6 +2723,9 @@ void LayerTreeHostImpl::PinchGestureUpdate(float magnify_delta,
InnerViewportScrollLayer()->ClampScrollToMaxScrollOffset();
}
+ active_tree_->SetRootLayerScrollOffsetDelegate(
+ root_layer_scroll_offset_delegate_);
+
client_->SetNeedsCommitOnImplThread();
SetNeedsRedraw();
client_->RenewTreePriority();
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698