| 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 15 matching lines...) Expand all Loading... |
| 26 SchedulerClient { | 26 SchedulerClient { |
| 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 virtual ~SingleThreadProxy(); | 31 virtual ~SingleThreadProxy(); |
| 32 | 32 |
| 33 // Proxy implementation | 33 // Proxy implementation |
| 34 virtual void FinishAllRendering() OVERRIDE; | 34 virtual void FinishAllRendering() OVERRIDE; |
| 35 virtual bool IsStarted() const OVERRIDE; | 35 virtual bool IsStarted() const OVERRIDE; |
| 36 virtual void SetOutputSurface(scoped_ptr<OutputSurface>) OVERRIDE; |
| 36 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 37 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 37 virtual void SetVisible(bool visible) OVERRIDE; | 38 virtual void SetVisible(bool visible) OVERRIDE; |
| 38 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 39 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
| 39 virtual void SetNeedsAnimate() OVERRIDE; | 40 virtual void SetNeedsAnimate() OVERRIDE; |
| 40 virtual void SetNeedsUpdateLayers() OVERRIDE; | 41 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 41 virtual void SetNeedsCommit() OVERRIDE; | 42 virtual void SetNeedsCommit() OVERRIDE; |
| 42 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 43 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 43 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 44 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 44 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} | 45 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} |
| 45 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... |
| 98 int priority_cutoff) OVERRIDE; | 99 int priority_cutoff) OVERRIDE; |
| 99 virtual bool IsInsideDraw() OVERRIDE; | 100 virtual bool IsInsideDraw() OVERRIDE; |
| 100 virtual void RenewTreePriority() OVERRIDE {} | 101 virtual void RenewTreePriority() OVERRIDE {} |
| 101 virtual void PostDelayedScrollbarFadeOnImplThread( | 102 virtual void PostDelayedScrollbarFadeOnImplThread( |
| 102 const base::Closure& start_fade, | 103 const base::Closure& start_fade, |
| 103 base::TimeDelta delay) OVERRIDE {} | 104 base::TimeDelta delay) OVERRIDE {} |
| 104 virtual void DidActivatePendingTree() OVERRIDE; | 105 virtual void DidActivatePendingTree() OVERRIDE; |
| 105 virtual void DidManageTiles() OVERRIDE; | 106 virtual void DidManageTiles() OVERRIDE; |
| 106 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} | 107 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} |
| 107 | 108 |
| 108 // Attempts to create the context and renderer synchronously. Calls | 109 void RequestNewOutputSurface(); |
| 109 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. | |
| 110 void CreateAndInitializeOutputSurface(); | |
| 111 | 110 |
| 112 // Called by the legacy path where RenderWidget does the scheduling. | 111 // Called by the legacy path where RenderWidget does the scheduling. |
| 113 void CompositeImmediately(base::TimeTicks frame_begin_time); | 112 void CompositeImmediately(base::TimeTicks frame_begin_time); |
| 114 | 113 |
| 115 private: | 114 private: |
| 116 SingleThreadProxy(LayerTreeHost* layer_tree_host, | 115 SingleThreadProxy(LayerTreeHost* layer_tree_host, |
| 117 LayerTreeHostSingleThreadClient* client); | 116 LayerTreeHostSingleThreadClient* client); |
| 118 | 117 |
| 119 void DoCommit(base::TimeTicks frame_begin_time); | 118 void DoCommit(base::TimeTicks frame_begin_time); |
| 120 DrawResult DoComposite(base::TimeTicks frame_begin_time, | 119 DrawResult DoComposite(base::TimeTicks frame_begin_time, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 private: | 206 private: |
| 208 DebugScopedSetImplThread impl_thread_; | 207 DebugScopedSetImplThread impl_thread_; |
| 209 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 208 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 210 | 209 |
| 211 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 210 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 212 }; | 211 }; |
| 213 | 212 |
| 214 } // namespace cc | 213 } // namespace cc |
| 215 | 214 |
| 216 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 215 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |