| Index: cc/layers/layer_impl.h
|
| diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
|
| index 40bf8108268ab6e9afd67ce7d2561389559c19a7..49e0ba1af2bfc51cdf0adc0e84f3972c14232ca4 100644
|
| --- a/cc/layers/layer_impl.h
|
| +++ b/cc/layers/layer_impl.h
|
| @@ -458,17 +458,20 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| gfx::Vector2dF bounds_delta() const { return bounds_delta_; }
|
|
|
| void SetCurrentScrollOffset(const gfx::ScrollOffset& scroll_offset);
|
| + // must only be called by tests when updating scroll offset of a single layer,
|
| + // the standard process to update scroll offsets is
|
| + // ScrollTree::UpdateScrollOffsetMap()
|
| void PushScrollOffsetFromMainThread(const gfx::ScrollOffset& scroll_offset);
|
| - // This method is similar to PushScrollOffsetFromMainThread but will cause the
|
| - // scroll offset given to clobber any scroll changes on the active tree in the
|
| - // time until this value is pushed to the active tree.
|
| - void PushScrollOffsetFromMainThreadAndClobberActiveValue(
|
| - const gfx::ScrollOffset& scroll_offset);
|
| - gfx::ScrollOffset PullDeltaForMainThread();
|
| +
|
| gfx::ScrollOffset CurrentScrollOffset() const;
|
| gfx::ScrollOffset BaseScrollOffset() const;
|
| gfx::Vector2dF ScrollDelta() const;
|
| void SetScrollDelta(const gfx::Vector2dF& delta);
|
| + // This is a mirror function of Layer::scroll_offset, which is supposed to be
|
| + // called only by PropertyTreeBuilder
|
| + gfx::ScrollOffset scroll_offset() const {
|
| + return synced_scroll_offset()->PendingBase();
|
| + }
|
|
|
| gfx::ScrollOffset MaxScrollOffset() const;
|
| gfx::ScrollOffset ClampScrollOffsetToLimits(gfx::ScrollOffset offset) const;
|
| @@ -502,8 +505,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
|
|
| bool user_scrollable(ScrollbarOrientation orientation) const;
|
|
|
| - void ApplySentScrollDeltasFromAbortedCommit();
|
| -
|
| void set_main_thread_scrolling_reasons(
|
| uint32_t main_thread_scrolling_reasons) {
|
| main_thread_scrolling_reasons_ = main_thread_scrolling_reasons;
|
| @@ -634,7 +635,8 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| }
|
| void GatherFrameTimingRequestIds(std::vector<int64_t>* request_ids);
|
|
|
| - SyncedScrollOffset* synced_scroll_offset() { return scroll_offset_.get(); }
|
| + const SyncedScrollOffset* synced_scroll_offset() const;
|
| + SyncedScrollOffset* synced_scroll_offset();
|
|
|
| // Get the correct invalidation region instead of conservative Rect
|
| // for layers that provide it.
|
| @@ -684,6 +686,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| }
|
|
|
| void NoteLayerPropertyChanged();
|
| + void DidUpdateScrollOffset();
|
|
|
| void PushLayerPropertyChangedForSubtree();
|
|
|
| @@ -717,8 +720,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| private:
|
| void ValidateQuadResourcesInternal(DrawQuad* quad) const;
|
|
|
| - void PushScrollOffset(const gfx::ScrollOffset* scroll_offset);
|
| - void DidUpdateScrollOffset();
|
| void NoteLayerPropertyChangedForDescendantsInternal();
|
| void PushLayerPropertyChangedForSubtreeInternal();
|
|
|
| @@ -748,8 +749,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| int layer_id_;
|
| LayerTreeImpl* layer_tree_impl_;
|
|
|
| - // Properties dynamically changeable on active tree.
|
| - scoped_refptr<SyncedScrollOffset> scroll_offset_;
|
| gfx::Vector2dF bounds_delta_;
|
|
|
| // Properties synchronized from the associated Layer.
|
|
|