| Index: cc/layers/layer_impl.h
|
| diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
|
| index fdc5261e673b99ef9b558dfd331a3dacaf40688b..2752c16914443455045bca754c1fd398602c2bd4 100644
|
| --- a/cc/layers/layer_impl.h
|
| +++ b/cc/layers/layer_impl.h
|
| @@ -83,7 +83,6 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| public LayerAnimationValueProvider,
|
| public AnimationDelegate {
|
| public:
|
| - typedef SyncedProperty<AdditionGroup<gfx::ScrollOffset>> SyncedScrollOffset;
|
| typedef LayerImplList RenderSurfaceListType;
|
| typedef LayerImplList LayerListType;
|
| typedef RenderSurfaceImpl RenderSurfaceType;
|
| @@ -462,17 +461,21 @@ 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 to call
|
| + // ScrollTree::UpdateScrollOffsetMap() which updates scroll offsets of all
|
| + // layers.
|
| 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;
|
| @@ -506,8 +509,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);
|
| uint32_t main_thread_scrolling_reasons() const {
|
| @@ -636,7 +637,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.
|
| @@ -686,6 +688,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
|
| }
|
|
|
| void NoteLayerPropertyChanged();
|
| + void DidUpdateScrollOffset();
|
|
|
| void PushLayerPropertyChangedForSubtree();
|
|
|
| @@ -719,8 +722,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();
|
|
|
| @@ -750,8 +751,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.
|
|
|