| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const int layer_tree_host_id; | 65 const int layer_tree_host_id; |
| 66 | 66 |
| 67 // Set only when SetNeedsAnimate is called. | 67 // Set only when SetNeedsAnimate is called. |
| 68 bool animate_requested; | 68 bool animate_requested; |
| 69 // Set only when SetNeedsCommit is called. | 69 // Set only when SetNeedsCommit is called. |
| 70 bool commit_requested; | 70 bool commit_requested; |
| 71 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. | 71 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. |
| 72 bool commit_request_sent_to_impl_thread; | 72 bool commit_request_sent_to_impl_thread; |
| 73 | 73 |
| 74 bool started; | 74 bool started; |
| 75 bool manage_tiles_pending; | 75 bool prepare_tiles_pending; |
| 76 bool can_cancel_commit; | 76 bool can_cancel_commit; |
| 77 bool defer_commits; | 77 bool defer_commits; |
| 78 | 78 |
| 79 RendererCapabilities renderer_capabilities_main_thread_copy; | 79 RendererCapabilities renderer_capabilities_main_thread_copy; |
| 80 | 80 |
| 81 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; | 81 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; |
| 82 base::WeakPtrFactory<ThreadProxy> weak_factory; | 82 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // Accessed on the main thread, or when main thread is blocked. | 85 // Accessed on the main thread, or when main thread is blocked. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 void DidSwapBuffersCompleteOnImplThread() override; | 188 void DidSwapBuffersCompleteOnImplThread() override; |
| 189 void OnCanDrawStateChanged(bool can_draw) override; | 189 void OnCanDrawStateChanged(bool can_draw) override; |
| 190 void NotifyReadyToActivate() override; | 190 void NotifyReadyToActivate() override; |
| 191 void NotifyReadyToDraw() override; | 191 void NotifyReadyToDraw() override; |
| 192 // Please call these 3 functions through | 192 // Please call these 3 functions through |
| 193 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and | 193 // LayerTreeHostImpl's SetNeedsRedraw(), SetNeedsRedrawRect() and |
| 194 // SetNeedsAnimate(). | 194 // SetNeedsAnimate(). |
| 195 void SetNeedsRedrawOnImplThread() override; | 195 void SetNeedsRedrawOnImplThread() override; |
| 196 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) override; | 196 void SetNeedsRedrawRectOnImplThread(const gfx::Rect& dirty_rect) override; |
| 197 void SetNeedsAnimateOnImplThread() override; | 197 void SetNeedsAnimateOnImplThread() override; |
| 198 void SetNeedsManageTilesOnImplThread() override; | 198 void SetNeedsPrepareTilesOnImplThread() override; |
| 199 void SetNeedsCommitOnImplThread() override; | 199 void SetNeedsCommitOnImplThread() override; |
| 200 void PostAnimationEventsToMainThreadOnImplThread( | 200 void PostAnimationEventsToMainThreadOnImplThread( |
| 201 scoped_ptr<AnimationEventsVector> queue) override; | 201 scoped_ptr<AnimationEventsVector> queue) override; |
| 202 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 202 bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
| 203 int priority_cutoff) override; | 203 int priority_cutoff) override; |
| 204 bool IsInsideDraw() override; | 204 bool IsInsideDraw() override; |
| 205 void RenewTreePriority() override; | 205 void RenewTreePriority() override; |
| 206 void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade, | 206 void PostDelayedScrollbarFadeOnImplThread(const base::Closure& start_fade, |
| 207 base::TimeDelta delay) override; | 207 base::TimeDelta delay) override; |
| 208 void DidActivateSyncTree() override; | 208 void DidActivateSyncTree() override; |
| 209 void DidManageTiles() override; | 209 void DidPrepareTiles() override; |
| 210 | 210 |
| 211 // SchedulerClient implementation | 211 // SchedulerClient implementation |
| 212 void WillBeginImplFrame(const BeginFrameArgs& args) override; | 212 void WillBeginImplFrame(const BeginFrameArgs& args) override; |
| 213 void ScheduledActionSendBeginMainFrame() override; | 213 void ScheduledActionSendBeginMainFrame() override; |
| 214 DrawResult ScheduledActionDrawAndSwapIfPossible() override; | 214 DrawResult ScheduledActionDrawAndSwapIfPossible() override; |
| 215 DrawResult ScheduledActionDrawAndSwapForced() override; | 215 DrawResult ScheduledActionDrawAndSwapForced() override; |
| 216 void ScheduledActionAnimate() override; | 216 void ScheduledActionAnimate() override; |
| 217 void ScheduledActionCommit() override; | 217 void ScheduledActionCommit() override; |
| 218 void ScheduledActionActivateSyncTree() override; | 218 void ScheduledActionActivateSyncTree() override; |
| 219 void ScheduledActionBeginOutputSurfaceCreation() override; | 219 void ScheduledActionBeginOutputSurfaceCreation() override; |
| 220 void ScheduledActionManageTiles() override; | 220 void ScheduledActionPrepareTiles() override; |
| 221 void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; | 221 void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; |
| 222 base::TimeDelta DrawDurationEstimate() override; | 222 base::TimeDelta DrawDurationEstimate() override; |
| 223 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; | 223 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; |
| 224 base::TimeDelta CommitToActivateDurationEstimate() override; | 224 base::TimeDelta CommitToActivateDurationEstimate() override; |
| 225 void DidBeginImplFrameDeadline() override; | 225 void DidBeginImplFrameDeadline() override; |
| 226 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; | 226 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; |
| 227 | 227 |
| 228 // ResourceUpdateControllerClient implementation | 228 // ResourceUpdateControllerClient implementation |
| 229 void ReadyToFinalizeTextureUpdates() override; | 229 void ReadyToFinalizeTextureUpdates() override; |
| 230 | 230 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 299 | 299 |
| 300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 301 }; | 301 }; |
| 302 | 302 |
| 303 } // namespace cc | 303 } // namespace cc |
| 304 | 304 |
| 305 #endif // CC_TREES_THREAD_PROXY_H_ | 305 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |