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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 8f2f0139328ba3465d80fcd6ba0974de2bed86e1..1fe9ba686f1f5daab00fb5a659aea6cd76f85a98 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -51,7 +51,6 @@ class LayerScrollOffsetDelegateProxy : public LayerImpl::ScrollOffsetDelegate {
// LayerScrollOffsetDelegate implementation.
void SetTotalScrollOffset(const gfx::ScrollOffset& new_offset) override {
last_set_scroll_offset_ = new_offset;
- layer_tree_impl_->UpdateScrollOffsetDelegate();
}
gfx::ScrollOffset GetTotalScrollOffset() override {
@@ -62,6 +61,10 @@ class LayerScrollOffsetDelegateProxy : public LayerImpl::ScrollOffsetDelegate {
return delegate_->IsExternalFlingActive();
}
+ void Update() const override {
+ layer_tree_impl_->UpdateScrollOffsetDelegate();
+ }
+
private:
LayerImpl* layer_;
LayerScrollOffsetDelegate* delegate_;
@@ -930,6 +933,9 @@ void LayerTreeImpl::SetRootLayerScrollOffsetDelegate(
outer_viewport_scroll_layer_->SetScrollOffsetDelegate(
outer_viewport_scroll_delegate_proxy_.get());
}
+
+ if (inner_viewport_scroll_layer_)
+ UpdateScrollOffsetDelegate();
}
}
@@ -945,6 +951,7 @@ void LayerTreeImpl::OnRootLayerDelegatedScrollOffsetChanged() {
void LayerTreeImpl::UpdateScrollOffsetDelegate() {
DCHECK(InnerViewportScrollLayer());
+ DCHECK(!OuterViewportScrollLayer() || outer_viewport_scroll_delegate_proxy_);
DCHECK(root_layer_scroll_offset_delegate_);
gfx::ScrollOffset offset =
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698