| 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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
| 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
| 7 | 7 |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 static scoped_ptr<Proxy> Create( | 28 static scoped_ptr<Proxy> Create( |
| 29 LayerTreeHost* layer_tree_host, | 29 LayerTreeHost* layer_tree_host, |
| 30 LayerTreeHostSingleThreadClient* client, | 30 LayerTreeHostSingleThreadClient* client, |
| 31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); |
| 32 virtual ~SingleThreadProxy(); | 32 virtual ~SingleThreadProxy(); |
| 33 | 33 |
| 34 // Proxy implementation | 34 // Proxy implementation |
| 35 virtual void FinishAllRendering() OVERRIDE; | 35 virtual void FinishAllRendering() OVERRIDE; |
| 36 virtual bool IsStarted() const OVERRIDE; | 36 virtual bool IsStarted() const OVERRIDE; |
| 37 virtual void SetOutputSurface(scoped_ptr<OutputSurface>) OVERRIDE; | |
| 38 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 37 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 39 virtual void SetVisible(bool visible) OVERRIDE; | 38 virtual void SetVisible(bool visible) OVERRIDE; |
| 40 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 39 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
| 41 virtual void SetNeedsAnimate() OVERRIDE; | 40 virtual void SetNeedsAnimate() OVERRIDE; |
| 42 virtual void SetNeedsUpdateLayers() OVERRIDE; | 41 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 43 virtual void SetNeedsCommit() OVERRIDE; | 42 virtual void SetNeedsCommit() OVERRIDE; |
| 44 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 43 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 45 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 44 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 46 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} | 45 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} |
| 47 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 46 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 int priority_cutoff) OVERRIDE; | 99 int priority_cutoff) OVERRIDE; |
| 101 virtual bool IsInsideDraw() OVERRIDE; | 100 virtual bool IsInsideDraw() OVERRIDE; |
| 102 virtual void RenewTreePriority() OVERRIDE {} | 101 virtual void RenewTreePriority() OVERRIDE {} |
| 103 virtual void PostDelayedScrollbarFadeOnImplThread( | 102 virtual void PostDelayedScrollbarFadeOnImplThread( |
| 104 const base::Closure& start_fade, | 103 const base::Closure& start_fade, |
| 105 base::TimeDelta delay) OVERRIDE {} | 104 base::TimeDelta delay) OVERRIDE {} |
| 106 virtual void DidActivateSyncTree() OVERRIDE {} | 105 virtual void DidActivateSyncTree() OVERRIDE {} |
| 107 virtual void DidManageTiles() OVERRIDE; | 106 virtual void DidManageTiles() OVERRIDE; |
| 108 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} | 107 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} |
| 109 | 108 |
| 110 void RequestNewOutputSurface(); | 109 // Attempts to create the context and renderer synchronously. Calls |
| 110 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. |
| 111 void CreateAndInitializeOutputSurface(); |
| 111 | 112 |
| 112 // Called by the legacy path where RenderWidget does the scheduling. | 113 // Called by the legacy path where RenderWidget does the scheduling. |
| 113 void CompositeImmediately(base::TimeTicks frame_begin_time); | 114 void CompositeImmediately(base::TimeTicks frame_begin_time); |
| 114 | 115 |
| 115 private: | 116 private: |
| 116 SingleThreadProxy( | 117 SingleThreadProxy( |
| 117 LayerTreeHost* layer_tree_host, | 118 LayerTreeHost* layer_tree_host, |
| 118 LayerTreeHostSingleThreadClient* client, | 119 LayerTreeHostSingleThreadClient* client, |
| 119 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); | 120 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); |
| 120 | 121 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 private: | 212 private: |
| 212 DebugScopedSetImplThread impl_thread_; | 213 DebugScopedSetImplThread impl_thread_; |
| 213 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 214 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 214 | 215 |
| 215 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 216 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 216 }; | 217 }; |
| 217 | 218 |
| 218 } // namespace cc | 219 } // namespace cc |
| 219 | 220 |
| 220 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 221 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |