| 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 26 matching lines...) Expand all Loading... |
| 37 virtual void SetNeedsAnimate() OVERRIDE; | 37 virtual void SetNeedsAnimate() OVERRIDE; |
| 38 virtual void SetNeedsUpdateLayers() OVERRIDE; | 38 virtual void SetNeedsUpdateLayers() OVERRIDE; |
| 39 virtual void SetNeedsCommit() OVERRIDE; | 39 virtual void SetNeedsCommit() OVERRIDE; |
| 40 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; | 40 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; |
| 41 virtual void SetNextCommitWaitsForActivation() OVERRIDE; | 41 virtual void SetNextCommitWaitsForActivation() OVERRIDE; |
| 42 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} | 42 virtual void NotifyInputThrottledUntilCommit() OVERRIDE {} |
| 43 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; | 43 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; |
| 44 virtual bool CommitRequested() const OVERRIDE; | 44 virtual bool CommitRequested() const OVERRIDE; |
| 45 virtual bool BeginMainFrameRequested() const OVERRIDE; | 45 virtual bool BeginMainFrameRequested() const OVERRIDE; |
| 46 virtual void MainThreadHasStoppedFlinging() OVERRIDE {} | 46 virtual void MainThreadHasStoppedFlinging() OVERRIDE {} |
| 47 virtual void Start() OVERRIDE; | 47 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; |
| 48 virtual void Stop() OVERRIDE; | 48 virtual void Stop() OVERRIDE; |
| 49 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; | 49 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; |
| 50 virtual void AcquireLayerTextures() OVERRIDE {} | 50 virtual void AcquireLayerTextures() OVERRIDE {} |
| 51 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 51 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
| 52 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 52 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
| 53 virtual bool CommitPendingForTesting() OVERRIDE; | 53 virtual bool CommitPendingForTesting() OVERRIDE; |
| 54 | 54 |
| 55 // LayerTreeHostImplClient implementation | 55 // LayerTreeHostImplClient implementation |
| 56 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 56 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
| 57 virtual void DidSwapBuffersOnImplThread() OVERRIDE; | 57 virtual void DidSwapBuffersOnImplThread() OVERRIDE; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void DidSwapFrame(); | 101 void DidSwapFrame(); |
| 102 | 102 |
| 103 bool ShouldComposite() const; | 103 bool ShouldComposite() const; |
| 104 void UpdateBackgroundAnimateTicking(); | 104 void UpdateBackgroundAnimateTicking(); |
| 105 | 105 |
| 106 // Accessed on main thread only. | 106 // Accessed on main thread only. |
| 107 LayerTreeHost* layer_tree_host_; | 107 LayerTreeHost* layer_tree_host_; |
| 108 LayerTreeHostSingleThreadClient* client_; | 108 LayerTreeHostSingleThreadClient* client_; |
| 109 bool created_offscreen_context_provider_; | 109 bool created_offscreen_context_provider_; |
| 110 | 110 |
| 111 // Holds the first output surface passed from Start. Should not be used for |
| 112 // anything else. |
| 113 scoped_ptr<OutputSurface> first_output_surface_; |
| 114 |
| 111 // Used on the Thread, but checked on main thread during | 115 // Used on the Thread, but checked on main thread during |
| 112 // initialization/shutdown. | 116 // initialization/shutdown. |
| 113 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 117 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
| 114 RendererCapabilities renderer_capabilities_for_main_thread_; | 118 RendererCapabilities renderer_capabilities_for_main_thread_; |
| 115 | 119 |
| 116 bool next_frame_is_newly_committed_frame_; | 120 bool next_frame_is_newly_committed_frame_; |
| 117 | 121 |
| 118 bool inside_draw_; | 122 bool inside_draw_; |
| 119 | 123 |
| 120 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); | 124 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 private: | 181 private: |
| 178 DebugScopedSetImplThread impl_thread_; | 182 DebugScopedSetImplThread impl_thread_; |
| 179 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 183 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 180 | 184 |
| 181 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 185 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 182 }; | 186 }; |
| 183 | 187 |
| 184 } // namespace cc | 188 } // namespace cc |
| 185 | 189 |
| 186 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 190 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |