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_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_THREAD_PROXY_H_ |
6 #define CC_TREES_THREAD_PROXY_H_ | 6 #define CC_TREES_THREAD_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 }; | 148 }; |
149 | 149 |
150 const MainThreadOnly& main() const; | 150 const MainThreadOnly& main() const; |
151 const MainThreadOrBlockedMainThread& blocked_main() const; | 151 const MainThreadOrBlockedMainThread& blocked_main() const; |
152 const CompositorThreadOnly& impl() const; | 152 const CompositorThreadOnly& impl() const; |
153 | 153 |
154 // Proxy implementation | 154 // Proxy implementation |
155 void FinishAllRendering() override; | 155 void FinishAllRendering() override; |
156 bool IsStarted() const override; | 156 bool IsStarted() const override; |
157 bool CommitToActiveTree() const override; | 157 bool CommitToActiveTree() const override; |
158 void SetOutputSurface(scoped_ptr<OutputSurface>) override; | 158 void SetOutputSurface(OutputSurface* output_surface) override; |
159 void SetLayerTreeHostClientReady() override; | 159 void SetLayerTreeHostClientReady() override; |
160 void SetVisible(bool visible) override; | 160 void SetVisible(bool visible) override; |
161 void SetThrottleFrameProduction(bool throttle) override; | 161 void SetThrottleFrameProduction(bool throttle) override; |
162 const RendererCapabilities& GetRendererCapabilities() const override; | 162 const RendererCapabilities& GetRendererCapabilities() const override; |
163 void SetNeedsAnimate() override; | 163 void SetNeedsAnimate() override; |
164 void SetNeedsUpdateLayers() override; | 164 void SetNeedsUpdateLayers() override; |
165 void SetNeedsCommit() override; | 165 void SetNeedsCommit() override; |
166 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; | 166 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; |
167 void SetNextCommitWaitsForActivation() override; | 167 void SetNextCommitWaitsForActivation() override; |
168 void NotifyInputThrottledUntilCommit() override; | 168 void NotifyInputThrottledUntilCommit() override; |
169 void SetDeferCommits(bool defer_commits) override; | 169 void SetDeferCommits(bool defer_commits) override; |
170 bool CommitRequested() const override; | 170 bool CommitRequested() const override; |
171 bool BeginMainFrameRequested() const override; | 171 bool BeginMainFrameRequested() const override; |
172 void MainThreadHasStoppedFlinging() override; | 172 void MainThreadHasStoppedFlinging() override; |
173 void Start() override; | 173 void Start() override; |
174 void Stop() override; | 174 void Stop() override; |
175 bool SupportsImplScrolling() const override; | 175 bool SupportsImplScrolling() const override; |
176 bool MainFrameWillHappenForTesting() override; | 176 bool MainFrameWillHappenForTesting() override; |
177 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; | 177 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
178 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; | 178 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; |
179 scoped_ptr<OutputSurface> ReleaseOutputSurface() override; | 179 void ReleaseOutputSurface() override; |
180 | 180 |
181 // LayerTreeHostImplClient implementation | 181 // LayerTreeHostImplClient implementation |
182 void UpdateRendererCapabilitiesOnImplThread() override; | 182 void UpdateRendererCapabilitiesOnImplThread() override; |
183 void DidLoseOutputSurfaceOnImplThread() override; | 183 void DidLoseOutputSurfaceOnImplThread() override; |
184 void CommitVSyncParameters(base::TimeTicks timebase, | 184 void CommitVSyncParameters(base::TimeTicks timebase, |
185 base::TimeDelta interval) override; | 185 base::TimeDelta interval) override; |
186 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; | 186 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; |
187 void SetMaxSwapsPendingOnImplThread(int max) override; | 187 void SetMaxSwapsPendingOnImplThread(int max) override; |
188 void DidSwapBuffersOnImplThread() override; | 188 void DidSwapBuffersOnImplThread() override; |
189 void DidSwapBuffersCompleteOnImplThread() override; | 189 void DidSwapBuffersCompleteOnImplThread() override; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); | 265 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); |
266 void FinishAllRenderingOnImplThread(CompletionEvent* completion); | 266 void FinishAllRenderingOnImplThread(CompletionEvent* completion); |
267 void InitializeImplOnImplThread(CompletionEvent* completion); | 267 void InitializeImplOnImplThread(CompletionEvent* completion); |
268 void SetLayerTreeHostClientReadyOnImplThread(); | 268 void SetLayerTreeHostClientReadyOnImplThread(); |
269 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); | 269 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); |
270 void SetThrottleFrameProductionOnImplThread(bool throttle); | 270 void SetThrottleFrameProductionOnImplThread(bool throttle); |
271 void HasInitializedOutputSurfaceOnImplThread( | 271 void HasInitializedOutputSurfaceOnImplThread( |
272 CompletionEvent* completion, | 272 CompletionEvent* completion, |
273 bool* has_initialized_output_surface); | 273 bool* has_initialized_output_surface); |
274 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); | 274 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); |
275 void InitializeOutputSurfaceOnImplThread( | 275 void InitializeOutputSurfaceOnImplThread(OutputSurface* output_surface); |
276 scoped_ptr<OutputSurface> output_surface); | 276 void ReleaseOutputSurfaceOnImplThread(CompletionEvent* completion); |
277 void ReleaseOutputSurfaceOnImplThread( | |
278 CompletionEvent* completion, | |
279 scoped_ptr<OutputSurface>* output_surface); | |
280 void FinishGLOnImplThread(CompletionEvent* completion); | 277 void FinishGLOnImplThread(CompletionEvent* completion); |
281 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 278 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
282 DrawResult DrawSwapInternal(bool forced_draw); | 279 DrawResult DrawSwapInternal(bool forced_draw); |
283 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 280 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
284 bool* main_frame_will_happen); | 281 bool* main_frame_will_happen); |
285 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 282 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
286 void MainThreadHasStoppedFlingingOnImplThread(); | 283 void MainThreadHasStoppedFlingingOnImplThread(); |
287 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 284 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
288 void SetDeferCommitsOnImplThread(bool defer_commits) const; | 285 void SetDeferCommitsOnImplThread(bool defer_commits) const; |
289 void PostFrameTimingEvents( | 286 void PostFrameTimingEvents( |
(...skipping 17 matching lines...) Expand all Loading... |
307 | 304 |
308 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 305 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
309 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 306 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
310 | 307 |
311 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 308 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
312 }; | 309 }; |
313 | 310 |
314 } // namespace cc | 311 } // namespace cc |
315 | 312 |
316 #endif // CC_TREES_THREAD_PROXY_H_ | 313 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |