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

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 206793003: cc: Split animating and drawing into separate actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments and rebased. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // LayerTreeHost->Proxy callback interface. 61 // LayerTreeHost->Proxy callback interface.
62 class LayerTreeHostImplClient { 62 class LayerTreeHostImplClient {
63 public: 63 public:
64 virtual void UpdateRendererCapabilitiesOnImplThread() = 0; 64 virtual void UpdateRendererCapabilitiesOnImplThread() = 0;
65 virtual void DidLoseOutputSurfaceOnImplThread() = 0; 65 virtual void DidLoseOutputSurfaceOnImplThread() = 0;
66 virtual void DidSwapBuffersOnImplThread() = 0; 66 virtual void DidSwapBuffersOnImplThread() = 0;
67 virtual void OnSwapBuffersCompleteOnImplThread() = 0; 67 virtual void OnSwapBuffersCompleteOnImplThread() = 0;
68 virtual void BeginFrame(const BeginFrameArgs& args) = 0; 68 virtual void BeginFrame(const BeginFrameArgs& args) = 0;
69 virtual void OnCanDrawStateChanged(bool can_draw) = 0; 69 virtual void OnCanDrawStateChanged(bool can_draw) = 0;
70 virtual void NotifyReadyToActivate() = 0; 70 virtual void NotifyReadyToActivate() = 0;
71 // Please call these 2 functions through 71 // Please call these 3 functions through
72 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). 72 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and
73 // SetNeedsAnimate().
73 virtual void SetNeedsRedrawOnImplThread() = 0; 74 virtual void SetNeedsRedrawOnImplThread() = 0;
74 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0; 75 virtual void SetNeedsRedrawRectOnImplThread(const gfx::Rect& damage_rect) = 0;
76 virtual void SetNeedsAnimateOnImplThread() = 0;
75 virtual void DidInitializeVisibleTileOnImplThread() = 0; 77 virtual void DidInitializeVisibleTileOnImplThread() = 0;
76 virtual void SetNeedsCommitOnImplThread() = 0; 78 virtual void SetNeedsCommitOnImplThread() = 0;
77 virtual void SetNeedsManageTilesOnImplThread() = 0; 79 virtual void SetNeedsManageTilesOnImplThread() = 0;
78 virtual void PostAnimationEventsToMainThreadOnImplThread( 80 virtual void PostAnimationEventsToMainThreadOnImplThread(
79 scoped_ptr<AnimationEventsVector> events) = 0; 81 scoped_ptr<AnimationEventsVector> events) = 0;
80 // Returns true if resources were deleted by this call. 82 // Returns true if resources were deleted by this call.
81 virtual bool ReduceContentsTextureMemoryOnImplThread( 83 virtual bool ReduceContentsTextureMemoryOnImplThread(
82 size_t limit_bytes, 84 size_t limit_bytes,
83 int priority_cutoff) = 0; 85 int priority_cutoff) = 0;
84 virtual void SendManagedMemoryStats() = 0; 86 virtual void SendManagedMemoryStats() = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; 129 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE;
128 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; 130 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE;
129 virtual void PinchGestureBegin() OVERRIDE; 131 virtual void PinchGestureBegin() OVERRIDE;
130 virtual void PinchGestureUpdate(float magnify_delta, 132 virtual void PinchGestureUpdate(float magnify_delta,
131 const gfx::Point& anchor) OVERRIDE; 133 const gfx::Point& anchor) OVERRIDE;
132 virtual void PinchGestureEnd() OVERRIDE; 134 virtual void PinchGestureEnd() OVERRIDE;
133 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset, 135 virtual void StartPageScaleAnimation(const gfx::Vector2d& target_offset,
134 bool anchor_point, 136 bool anchor_point,
135 float page_scale, 137 float page_scale,
136 base::TimeDelta duration) OVERRIDE; 138 base::TimeDelta duration) OVERRIDE;
137 virtual void ScheduleAnimation() OVERRIDE; 139 virtual void SetNeedsAnimate() OVERRIDE;
138 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_port) 140 virtual bool HaveTouchEventHandlersAt(const gfx::Point& viewport_port)
139 OVERRIDE; 141 OVERRIDE;
140 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor( 142 virtual scoped_ptr<SwapPromiseMonitor> CreateLatencyInfoSwapPromiseMonitor(
141 ui::LatencyInfo* latency) OVERRIDE; 143 ui::LatencyInfo* latency) OVERRIDE;
142 144
143 // TopControlsManagerClient implementation. 145 // TopControlsManagerClient implementation.
144 virtual void DidChangeTopControlsPosition() OVERRIDE; 146 virtual void DidChangeTopControlsPosition() OVERRIDE;
145 virtual bool HaveRootScrollLayer() const OVERRIDE; 147 virtual bool HaveRootScrollLayer() const OVERRIDE;
146 148
147 void StartScrollbarAnimation(); 149 void StartScrollbarAnimation();
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 int id_; 660 int id_;
659 661
660 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 662 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
661 663
662 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 664 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
663 }; 665 };
664 666
665 } // namespace cc 667 } // namespace cc
666 668
667 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 669 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698