| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 virtual void SendManagedMemoryStats() OVERRIDE; | 86 virtual void SendManagedMemoryStats() OVERRIDE; |
| 87 virtual bool IsInsideDraw() OVERRIDE; | 87 virtual bool IsInsideDraw() OVERRIDE; |
| 88 virtual void RenewTreePriority() OVERRIDE; | 88 virtual void RenewTreePriority() OVERRIDE; |
| 89 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) | 89 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) |
| 90 OVERRIDE; | 90 OVERRIDE; |
| 91 virtual void DidActivatePendingTree() OVERRIDE; | 91 virtual void DidActivatePendingTree() OVERRIDE; |
| 92 | 92 |
| 93 // SchedulerClient implementation | 93 // SchedulerClient implementation |
| 94 virtual void SetNeedsBeginFrameOnImplThread(bool enable) OVERRIDE; | 94 virtual void SetNeedsBeginFrameOnImplThread(bool enable) OVERRIDE; |
| 95 virtual void ScheduledActionSendBeginFrameToMainThread() OVERRIDE; | 95 virtual void ScheduledActionSendBeginFrameToMainThread() OVERRIDE; |
| 96 virtual ScheduledActionDrawAndSwapResult | 96 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapIfPossible() |
| 97 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; | |
| 98 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() | |
| 99 OVERRIDE; | 97 OVERRIDE; |
| 98 virtual DrawSwapReadbackResult ScheduledActionDrawAndSwapForced() OVERRIDE; |
| 99 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() OVERRIDE; |
| 100 virtual void ScheduledActionCommit() OVERRIDE; | 100 virtual void ScheduledActionCommit() OVERRIDE; |
| 101 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; | 101 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; |
| 102 virtual void ScheduledActionActivatePendingTree() OVERRIDE; | 102 virtual void ScheduledActionActivatePendingTree() OVERRIDE; |
| 103 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; | 103 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; |
| 104 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 104 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
| 105 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; | 105 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; |
| 106 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 106 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
| 107 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; | 107 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; |
| 108 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 108 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
| 109 | 109 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 135 void OnOutputSurfaceInitializeAttempted( | 135 void OnOutputSurfaceInitializeAttempted( |
| 136 bool success, | 136 bool success, |
| 137 const RendererCapabilities& capabilities); | 137 const RendererCapabilities& capabilities); |
| 138 void SendCommitRequestToImplThreadIfNeeded(); | 138 void SendCommitRequestToImplThreadIfNeeded(); |
| 139 | 139 |
| 140 // Called on impl thread. | 140 // Called on impl thread. |
| 141 struct ReadbackRequest; | 141 struct ReadbackRequest; |
| 142 struct CommitPendingRequest; | 142 struct CommitPendingRequest; |
| 143 struct SchedulerStateRequest; | 143 struct SchedulerStateRequest; |
| 144 | 144 |
| 145 void ForceCommitOnImplThread(CompletionEvent* completion); | 145 void ForceCommitForReadbackOnImplThread( |
| 146 CompletionEvent* begin_frame_sent_completion, |
| 147 ReadbackRequest* request); |
| 146 void StartCommitOnImplThread( | 148 void StartCommitOnImplThread( |
| 147 CompletionEvent* completion, | 149 CompletionEvent* completion, |
| 148 ResourceUpdateQueue* queue, | 150 ResourceUpdateQueue* queue, |
| 149 scoped_refptr<cc::ContextProvider> offscreen_context_provider); | 151 scoped_refptr<cc::ContextProvider> offscreen_context_provider); |
| 150 void BeginFrameAbortedByMainThreadOnImplThread(bool did_handle); | 152 void BeginFrameAbortedByMainThreadOnImplThread(bool did_handle); |
| 151 void RequestReadbackOnImplThread(ReadbackRequest* request); | 153 void RequestReadbackOnImplThread(ReadbackRequest* request); |
| 152 void FinishAllRenderingOnImplThread(CompletionEvent* completion); | 154 void FinishAllRenderingOnImplThread(CompletionEvent* completion); |
| 153 void InitializeImplOnImplThread(CompletionEvent* completion); | 155 void InitializeImplOnImplThread(CompletionEvent* completion); |
| 154 void SetLayerTreeHostClientReadyOnImplThread(); | 156 void SetLayerTreeHostClientReadyOnImplThread(); |
| 155 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); | 157 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); |
| 156 void UpdateBackgroundAnimateTicking(); | 158 void UpdateBackgroundAnimateTicking(); |
| 157 void HasInitializedOutputSurfaceOnImplThread( | 159 void HasInitializedOutputSurfaceOnImplThread( |
| 158 CompletionEvent* completion, | 160 CompletionEvent* completion, |
| 159 bool* has_initialized_output_surface); | 161 bool* has_initialized_output_surface); |
| 160 void InitializeOutputSurfaceOnImplThread( | 162 void InitializeOutputSurfaceOnImplThread( |
| 161 CompletionEvent* completion, | 163 CompletionEvent* completion, |
| 162 scoped_ptr<OutputSurface> output_surface, | 164 scoped_ptr<OutputSurface> output_surface, |
| 163 scoped_refptr<ContextProvider> offscreen_context_provider, | 165 scoped_refptr<ContextProvider> offscreen_context_provider, |
| 164 bool* success, | 166 bool* success, |
| 165 RendererCapabilities* capabilities); | 167 RendererCapabilities* capabilities); |
| 166 void FinishGLOnImplThread(CompletionEvent* completion); | 168 void FinishGLOnImplThread(CompletionEvent* completion); |
| 167 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 169 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 168 void AcquireLayerTexturesForMainThreadOnImplThread( | 170 void AcquireLayerTexturesForMainThreadOnImplThread( |
| 169 CompletionEvent* completion); | 171 CompletionEvent* completion); |
| 170 ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapInternal( | 172 DrawSwapReadbackResult DrawSwapReadbackInternal(bool forced_draw, |
| 171 bool forced_draw); | 173 bool swap_requested, |
| 174 bool readback_requested); |
| 172 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 175 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 173 void CheckOutputSurfaceStatusOnImplThread(); | 176 void CheckOutputSurfaceStatusOnImplThread(); |
| 174 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 177 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 175 void SchedulerStateAsValueOnImplThreadForTesting( | 178 void SchedulerStateAsValueOnImplThreadForTesting( |
| 176 SchedulerStateRequest* request); | 179 SchedulerStateRequest* request); |
| 177 void AsValueOnImplThread(CompletionEvent* completion, | 180 void AsValueOnImplThread(CompletionEvent* completion, |
| 178 base::DictionaryValue* state) const; | 181 base::DictionaryValue* state) const; |
| 179 void RenewTreePriorityOnImplThread(); | 182 void RenewTreePriorityOnImplThread(); |
| 180 void DidSwapUseIncompleteTileOnImplThread(); | 183 void DidSwapUseIncompleteTileOnImplThread(); |
| 181 void StartScrollbarAnimationOnImplThread(); | 184 void StartScrollbarAnimationOnImplThread(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 // activation_duration_history_. | 269 // activation_duration_history_. |
| 267 base::TimeTicks begin_frame_sent_to_main_thread_time_; | 270 base::TimeTicks begin_frame_sent_to_main_thread_time_; |
| 268 base::TimeTicks commit_complete_time_; | 271 base::TimeTicks commit_complete_time_; |
| 269 | 272 |
| 270 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 273 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 271 }; | 274 }; |
| 272 | 275 |
| 273 } // namespace cc | 276 } // namespace cc |
| 274 | 277 |
| 275 #endif // CC_TREES_THREAD_PROXY_H_ | 278 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |