| 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 13 matching lines...) Expand all Loading... |
| 24 static scoped_ptr<Proxy> Create( | 24 static scoped_ptr<Proxy> Create( |
| 25 LayerTreeHost* layer_tree_host, | 25 LayerTreeHost* layer_tree_host, |
| 26 LayerTreeHostSingleThreadClient* client); | 26 LayerTreeHostSingleThreadClient* client); |
| 27 virtual ~SingleThreadProxy(); | 27 virtual ~SingleThreadProxy(); |
| 28 | 28 |
| 29 // Proxy implementation | 29 // Proxy implementation |
| 30 virtual void FinishAllRendering() OVERRIDE; | 30 virtual void FinishAllRendering() OVERRIDE; |
| 31 virtual bool IsStarted() const OVERRIDE; | 31 virtual bool IsStarted() const OVERRIDE; |
| 32 virtual void SetLayerTreeHostClientReady() OVERRIDE; | 32 virtual void SetLayerTreeHostClientReady() OVERRIDE; |
| 33 virtual void SetVisible(bool visible) OVERRIDE; | 33 virtual void SetVisible(bool visible) OVERRIDE; |
| 34 virtual void CreateAndInitializeOutputSurface() OVERRIDE; | |
| 35 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; | 34 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; |
| 36 virtual void SetNeedsAnimate() OVERRIDE; | 35 virtual void SetNeedsAnimate() OVERRIDE; |
| 37 virtual void SetNeedsUpdateLayers() OVERRIDE; | 36 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 38 virtual void SetNeedsCommit() OVERRIDE; | 37 virtual void SetNeedsCommit() OVERRIDE; |
| 39 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; | 38 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE; |
| 40 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 39 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 41 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} | 40 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} |
| 42 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 41 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| 43 virtual bool CommitRequested() const OVERRIDE; | 42 virtual bool CommitRequested() const OVERRIDE; |
| 44 virtual bool BeginMainFrameRequested() const OVERRIDE; | 43 virtual bool BeginMainFrameRequested() const OVERRIDE; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 virtual void SendManagedMemoryStats() OVERRIDE; | 76 virtual void SendManagedMemoryStats() OVERRIDE; |
| 78 virtual bool IsInsideDraw() OVERRIDE; | 77 virtual bool IsInsideDraw() OVERRIDE; |
| 79 virtual void RenewTreePriority() OVERRIDE {} | 78 virtual void RenewTreePriority() OVERRIDE {} |
| 80 virtual void PostDelayedScrollbarFadeOnImplThread( | 79 virtual void PostDelayedScrollbarFadeOnImplThread( |
| 81 const base::Closure& start_fade, | 80 const base::Closure& start_fade, |
| 82 base::TimeDelta delay) OVERRIDE {} | 81 base::TimeDelta delay) OVERRIDE {} |
| 83 virtual void DidActivatePendingTree() OVERRIDE {} | 82 virtual void DidActivatePendingTree() OVERRIDE {} |
| 84 virtual void DidManageTiles() OVERRIDE {} | 83 virtual void DidManageTiles() OVERRIDE {} |
| 85 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} | 84 virtual void SetDebugState(const LayerTreeDebugState& debug_state) OVERRIDE {} |
| 86 | 85 |
| 86 // Attempts to create the context and renderer synchronously. Calls |
| 87 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. |
| 88 void CreateAndInitializeOutputSurface(); |
| 89 |
| 87 // Called by the legacy path where RenderWidget does the scheduling. | 90 // Called by the legacy path where RenderWidget does the scheduling. |
| 88 void CompositeImmediately(base::TimeTicks frame_begin_time); | 91 void CompositeImmediately(base::TimeTicks frame_begin_time); |
| 89 | 92 |
| 90 private: | 93 private: |
| 91 SingleThreadProxy(LayerTreeHost* layer_tree_host, | 94 SingleThreadProxy(LayerTreeHost* layer_tree_host, |
| 92 LayerTreeHostSingleThreadClient* client); | 95 LayerTreeHostSingleThreadClient* client); |
| 93 | 96 |
| 94 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); | 97 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); |
| 95 bool DoComposite(base::TimeTicks frame_begin_time, | 98 bool DoComposite(base::TimeTicks frame_begin_time, |
| 96 LayerTreeHostImpl::FrameData* frame); | 99 LayerTreeHostImpl::FrameData* frame); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 private: | 175 private: |
| 173 DebugScopedSetImplThread impl_thread_; | 176 DebugScopedSetImplThread impl_thread_; |
| 174 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 177 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 175 | 178 |
| 176 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 179 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 177 }; | 180 }; |
| 178 | 181 |
| 179 } // namespace cc | 182 } // namespace cc |
| 180 | 183 |
| 181 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 184 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |