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