| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 57 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 58 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 58 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 59 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; | 59 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; |
| 60 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 60 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| 61 virtual bool CommitRequested() const OVERRIDE; | 61 virtual bool CommitRequested() const OVERRIDE; |
| 62 virtual bool BeginMainFrameRequested() const OVERRIDE; | 62 virtual bool BeginMainFrameRequested() const OVERRIDE; |
| 63 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 63 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
| 64 virtual void Start() OVERRIDE; | 64 virtual void Start() OVERRIDE; |
| 65 virtual void Stop() OVERRIDE; | 65 virtual void Stop() OVERRIDE; |
| 66 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 66 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
| 67 virtual void AcquireLayerTextures() OVERRIDE; | |
| 68 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 67 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
| 69 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE; | 68 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE; |
| 70 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 69 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
| 71 virtual bool CommitPendingForTesting() OVERRIDE; | 70 virtual bool CommitPendingForTesting() OVERRIDE; |
| 72 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; | 71 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; |
| 73 | 72 |
| 74 // LayerTreeHostImplClient implementation | 73 // LayerTreeHostImplClient implementation |
| 75 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; | 74 virtual void UpdateRendererCapabilitiesOnImplThread() OVERRIDE; |
| 76 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 75 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
| 77 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} | 76 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} |
| (...skipping 26 matching lines...) Expand all Loading... |
| 104 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; | 103 virtual void SetNeedsBeginImplFrame(bool enable) OVERRIDE; |
| 105 virtual void ScheduledActionSendBeginMainFrame() OVERRIDE; | 104 virtual void ScheduledActionSendBeginMainFrame() OVERRIDE; |
| 106 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapIfPossible() | 105 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapIfPossible() |
| 107 OVERRIDE; | 106 OVERRIDE; |
| 108 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapForced() OVERRIDE; | 107 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapForced() OVERRIDE; |
| 109 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() OVERRIDE; | 108 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() OVERRIDE; |
| 110 virtual void ScheduledActionCommit() OVERRIDE; | 109 virtual void ScheduledActionCommit() OVERRIDE; |
| 111 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; | 110 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; |
| 112 virtual void ScheduledActionActivatePendingTree() OVERRIDE; | 111 virtual void ScheduledActionActivatePendingTree() OVERRIDE; |
| 113 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; | 112 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; |
| 114 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | |
| 115 virtual void ScheduledActionManageTiles() OVERRIDE; | 113 virtual void ScheduledActionManageTiles() OVERRIDE; |
| 116 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; | 114 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; |
| 117 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 115 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
| 118 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; | 116 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; |
| 119 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 117 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
| 120 virtual void DidBeginImplFrameDeadline() OVERRIDE; | 118 virtual void DidBeginImplFrameDeadline() OVERRIDE; |
| 121 | 119 |
| 122 // ResourceUpdateControllerClient implementation | 120 // ResourceUpdateControllerClient implementation |
| 123 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 121 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
| 124 | 122 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 CompletionEvent* completion, | 173 CompletionEvent* completion, |
| 176 bool* has_initialized_output_surface); | 174 bool* has_initialized_output_surface); |
| 177 void InitializeOutputSurfaceOnImplThread( | 175 void InitializeOutputSurfaceOnImplThread( |
| 178 CompletionEvent* completion, | 176 CompletionEvent* completion, |
| 179 scoped_ptr<OutputSurface> output_surface, | 177 scoped_ptr<OutputSurface> output_surface, |
| 180 scoped_refptr<ContextProvider> offscreen_context_provider, | 178 scoped_refptr<ContextProvider> offscreen_context_provider, |
| 181 bool* success, | 179 bool* success, |
| 182 RendererCapabilities* capabilities); | 180 RendererCapabilities* capabilities); |
| 183 void FinishGLOnImplThread(CompletionEvent* completion); | 181 void FinishGLOnImplThread(CompletionEvent* completion); |
| 184 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 182 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 185 void AcquireLayerTexturesForMainThreadOnImplThread( | |
| 186 CompletionEvent* completion); | |
| 187 DrawSwapReadbackResult DrawSwapReadbackInternal(bool forced_draw, | 183 DrawSwapReadbackResult DrawSwapReadbackInternal(bool forced_draw, |
| 188 bool swap_requested, | 184 bool swap_requested, |
| 189 bool readback_requested); | 185 bool readback_requested); |
| 190 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 186 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 191 void CheckOutputSurfaceStatusOnImplThread(); | 187 void CheckOutputSurfaceStatusOnImplThread(); |
| 192 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 188 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 193 void SchedulerStateAsValueOnImplThreadForTesting( | 189 void SchedulerStateAsValueOnImplThreadForTesting( |
| 194 SchedulerStateRequest* request); | 190 SchedulerStateRequest* request); |
| 195 void AsValueOnImplThread(CompletionEvent* completion, | 191 void AsValueOnImplThread(CompletionEvent* completion, |
| 196 base::DictionaryValue* state) const; | 192 base::DictionaryValue* state) const; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 213 // Set only when SetNeedsAnimate is called. | 209 // Set only when SetNeedsAnimate is called. |
| 214 bool animate_requested; | 210 bool animate_requested; |
| 215 // Set only when SetNeedsCommit is called. | 211 // Set only when SetNeedsCommit is called. |
| 216 bool commit_requested; | 212 bool commit_requested; |
| 217 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 213 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
| 218 bool commit_request_sent_to_impl_thread; | 214 bool commit_request_sent_to_impl_thread; |
| 219 // Set by BeginMainFrame | 215 // Set by BeginMainFrame |
| 220 bool created_offscreen_context_provider; | 216 bool created_offscreen_context_provider; |
| 221 | 217 |
| 222 bool started; | 218 bool started; |
| 223 bool textures_acquired; | |
| 224 bool in_composite_and_readback; | 219 bool in_composite_and_readback; |
| 225 bool manage_tiles_pending; | 220 bool manage_tiles_pending; |
| 226 bool can_cancel_commit; | 221 bool can_cancel_commit; |
| 227 bool defer_commits; | 222 bool defer_commits; |
| 228 | 223 |
| 229 base::CancelableClosure output_surface_creation_callback; | 224 base::CancelableClosure output_surface_creation_callback; |
| 230 RendererCapabilities renderer_capabilities_main_thread_copy; | 225 RendererCapabilities renderer_capabilities_main_thread_copy; |
| 231 | 226 |
| 232 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | 227 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; |
| 233 base::WeakPtrFactory<ThreadProxy> weak_factory; | 228 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 268 |
| 274 // Set when the main thread is waiting on a readback. | 269 // Set when the main thread is waiting on a readback. |
| 275 ReadbackRequest* readback_request; | 270 ReadbackRequest* readback_request; |
| 276 | 271 |
| 277 // Set when the main thread is waiting on a commit to complete. | 272 // Set when the main thread is waiting on a commit to complete. |
| 278 CompletionEvent* commit_completion_event; | 273 CompletionEvent* commit_completion_event; |
| 279 | 274 |
| 280 // Set when the main thread is waiting on a pending tree activation. | 275 // Set when the main thread is waiting on a pending tree activation. |
| 281 CompletionEvent* completion_event_for_commit_held_on_tree_activation; | 276 CompletionEvent* completion_event_for_commit_held_on_tree_activation; |
| 282 | 277 |
| 283 // Set when the main thread is waiting on layers to be drawn. | |
| 284 CompletionEvent* texture_acquisition_completion_event; | |
| 285 | |
| 286 scoped_ptr<ResourceUpdateController> current_resource_update_controller; | 278 scoped_ptr<ResourceUpdateController> current_resource_update_controller; |
| 287 | 279 |
| 288 // Set when the next draw should post DidCommitAndDrawFrame to the main | 280 // Set when the next draw should post DidCommitAndDrawFrame to the main |
| 289 // thread. | 281 // thread. |
| 290 bool next_frame_is_newly_committed_frame; | 282 bool next_frame_is_newly_committed_frame; |
| 291 | 283 |
| 292 bool inside_draw; | 284 bool inside_draw; |
| 293 | 285 |
| 294 bool input_throttled_until_commit; | 286 bool input_throttled_until_commit; |
| 295 | 287 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 312 | 304 |
| 313 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 305 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 314 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 306 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 315 | 307 |
| 316 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 308 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 317 }; | 309 }; |
| 318 | 310 |
| 319 } // namespace cc | 311 } // namespace cc |
| 320 | 312 |
| 321 #endif // CC_TREES_THREAD_PROXY_H_ | 313 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |