| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 private: | 87 private: |
| 88 SingleThreadProxy(LayerTreeHost* layer_tree_host, | 88 SingleThreadProxy(LayerTreeHost* layer_tree_host, |
| 89 LayerTreeHostSingleThreadClient* client); | 89 LayerTreeHostSingleThreadClient* client); |
| 90 | 90 |
| 91 void OnOutputSurfaceInitializeAttempted(bool success); | 91 void OnOutputSurfaceInitializeAttempted(bool success); |
| 92 bool CommitAndComposite(base::TimeTicks frame_begin_time, | 92 bool CommitAndComposite(base::TimeTicks frame_begin_time, |
| 93 const gfx::Rect& device_viewport_damage_rect, | 93 const gfx::Rect& device_viewport_damage_rect, |
| 94 bool for_readback, | 94 bool for_readback, |
| 95 LayerTreeHostImpl::FrameData* frame); | 95 LayerTreeHostImpl::FrameData* frame); |
| 96 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); | 96 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); |
| 97 bool DoComposite(scoped_refptr<ContextProvider> offscreen_context_provider, | 97 bool DoComposite(base::TimeTicks frame_begin_time, |
| 98 base::TimeTicks frame_begin_time, | |
| 99 const gfx::Rect& device_viewport_damage_rect, | 98 const gfx::Rect& device_viewport_damage_rect, |
| 100 bool for_readback, | 99 bool for_readback, |
| 101 LayerTreeHostImpl::FrameData* frame); | 100 LayerTreeHostImpl::FrameData* frame); |
| 102 void DidSwapFrame(); | 101 void DidSwapFrame(); |
| 103 | 102 |
| 104 bool ShouldComposite() const; | 103 bool ShouldComposite() const; |
| 105 void UpdateBackgroundAnimateTicking(); | 104 void UpdateBackgroundAnimateTicking(); |
| 106 | 105 |
| 107 // Accessed on main thread only. | 106 // Accessed on main thread only. |
| 108 LayerTreeHost* layer_tree_host_; | 107 LayerTreeHost* layer_tree_host_; |
| 109 LayerTreeHostSingleThreadClient* client_; | 108 LayerTreeHostSingleThreadClient* client_; |
| 110 bool created_offscreen_context_provider_; | |
| 111 | 109 |
| 112 // Used on the Thread, but checked on main thread during | 110 // Used on the Thread, but checked on main thread during |
| 113 // initialization/shutdown. | 111 // initialization/shutdown. |
| 114 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 112 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
| 115 RendererCapabilities renderer_capabilities_for_main_thread_; | 113 RendererCapabilities renderer_capabilities_for_main_thread_; |
| 116 | 114 |
| 117 bool next_frame_is_newly_committed_frame_; | 115 bool next_frame_is_newly_committed_frame_; |
| 118 | 116 |
| 119 bool inside_draw_; | 117 bool inside_draw_; |
| 120 | 118 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 private: | 176 private: |
| 179 DebugScopedSetImplThread impl_thread_; | 177 DebugScopedSetImplThread impl_thread_; |
| 180 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 178 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 181 | 179 |
| 182 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 180 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 183 }; | 181 }; |
| 184 | 182 |
| 185 } // namespace cc | 183 } // namespace cc |
| 186 | 184 |
| 187 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 185 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |