OLD | NEW |
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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 virtual void SetNeedsAnimateOnImplThread() OVERRIDE; | 91 virtual void SetNeedsAnimateOnImplThread() OVERRIDE; |
92 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; | 92 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; |
93 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; | 93 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; |
94 virtual void SetNeedsCommitOnImplThread() OVERRIDE; | 94 virtual void SetNeedsCommitOnImplThread() OVERRIDE; |
95 virtual void PostAnimationEventsToMainThreadOnImplThread( | 95 virtual void PostAnimationEventsToMainThreadOnImplThread( |
96 scoped_ptr<AnimationEventsVector> events) OVERRIDE; | 96 scoped_ptr<AnimationEventsVector> events) OVERRIDE; |
97 virtual bool ReduceContentsTextureMemoryOnImplThread( | 97 virtual bool ReduceContentsTextureMemoryOnImplThread( |
98 size_t limit_bytes, | 98 size_t limit_bytes, |
99 int priority_cutoff) OVERRIDE; | 99 int priority_cutoff) OVERRIDE; |
100 virtual bool IsInsideDraw() OVERRIDE; | 100 virtual bool IsInsideDraw() OVERRIDE; |
101 virtual void RenewTreePriority() OVERRIDE {} | 101 virtual void RenewTreePriority() OVERRIDE; |
102 virtual void PostDelayedScrollbarFadeOnImplThread( | 102 virtual void PostDelayedScrollbarFadeOnImplThread( |
103 const base::Closure& start_fade, | 103 const base::Closure& start_fade, |
104 base::TimeDelta delay) OVERRIDE {} | 104 base::TimeDelta delay) OVERRIDE {} |
105 virtual void DidActivateSyncTree() OVERRIDE {} | 105 virtual void DidActivateSyncTree() OVERRIDE; |
106 virtual void DidManageTiles() OVERRIDE; | 106 virtual void DidManageTiles() OVERRIDE; |
107 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} | 107 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} |
108 | 108 |
109 // Attempts to create the context and renderer synchronously. Calls | 109 // Attempts to create the context and renderer synchronously. Calls |
110 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. | 110 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. |
111 void CreateAndInitializeOutputSurface(); | 111 void CreateAndInitializeOutputSurface(); |
112 | 112 |
113 // Called by the legacy path where RenderWidget does the scheduling. | 113 // Called by the legacy path where RenderWidget does the scheduling. |
114 void CompositeImmediately(base::TimeTicks frame_begin_time); | 114 void CompositeImmediately(base::TimeTicks frame_begin_time); |
115 | 115 |
116 private: | 116 private: |
117 SingleThreadProxy( | 117 SingleThreadProxy( |
118 LayerTreeHost* layer_tree_host, | 118 LayerTreeHost* layer_tree_host, |
119 LayerTreeHostSingleThreadClient* client, | 119 LayerTreeHostSingleThreadClient* client, |
120 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 120 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); |
121 | 121 |
122 void BeginMainFrame(); | 122 void BeginMainFrame(); |
123 void BeginMainFrameAbortedOnImplThread(); | 123 void BeginMainFrameAbortedOnImplThread(); |
124 void DoCommit(const BeginFrameArgs& begin_frame_args); | 124 void DoCommit(const BeginFrameArgs& begin_frame_args); |
125 DrawResult DoComposite(base::TimeTicks frame_begin_time, | 125 DrawResult DoComposite(base::TimeTicks frame_begin_time, |
126 LayerTreeHostImpl::FrameData* frame); | 126 LayerTreeHostImpl::FrameData* frame); |
127 void DoSwap(); | 127 void DoSwap(); |
128 void DidCommitAndDrawFrame(); | 128 void DidCommitAndDrawFrame(); |
| 129 void CommitComplete(); |
129 | 130 |
130 bool ShouldComposite() const; | 131 bool ShouldComposite() const; |
131 void UpdateBackgroundAnimateTicking(); | 132 void UpdateBackgroundAnimateTicking(); |
132 | 133 |
133 // Accessed on main thread only. | 134 // Accessed on main thread only. |
134 LayerTreeHost* layer_tree_host_; | 135 LayerTreeHost* layer_tree_host_; |
135 LayerTreeHostSingleThreadClient* client_; | 136 LayerTreeHostSingleThreadClient* client_; |
136 | 137 |
137 // Used on the Thread, but checked on main thread during | 138 // Used on the Thread, but checked on main thread during |
138 // initialization/shutdown. | 139 // initialization/shutdown. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 private: | 213 private: |
213 DebugScopedSetImplThread impl_thread_; | 214 DebugScopedSetImplThread impl_thread_; |
214 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 215 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
215 | 216 |
216 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 217 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
217 }; | 218 }; |
218 | 219 |
219 } // namespace cc | 220 } // namespace cc |
220 | 221 |
221 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 222 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |