| 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.h" | 10 #include "base/time.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 // Called by the legacy path where RenderWidget does the scheduling. | 76 // Called by the legacy path where RenderWidget does the scheduling. |
| 77 void CompositeImmediately(base::TimeTicks frame_begin_time); | 77 void CompositeImmediately(base::TimeTicks frame_begin_time); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host); | 80 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host); |
| 81 | 81 |
| 82 void OnOutputSurfaceInitializeAttempted(bool success); | 82 void OnOutputSurfaceInitializeAttempted(bool success); |
| 83 bool CommitAndComposite(base::TimeTicks frame_begin_time, | 83 bool CommitAndComposite(base::TimeTicks frame_begin_time, |
| 84 gfx::Rect device_viewport_damage_rect, | 84 gfx::Rect device_viewport_damage_rect, |
| 85 bool for_readback, |
| 85 LayerTreeHostImpl::FrameData* frame); | 86 LayerTreeHostImpl::FrameData* frame); |
| 86 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); | 87 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); |
| 87 bool DoComposite( | 88 bool DoComposite( |
| 88 scoped_refptr<cc::ContextProvider> offscreen_context_provider, | 89 scoped_refptr<cc::ContextProvider> offscreen_context_provider, |
| 89 base::TimeTicks frame_begin_time, | 90 base::TimeTicks frame_begin_time, |
| 90 gfx::Rect device_viewport_damage_rect, | 91 gfx::Rect device_viewport_damage_rect, |
| 92 bool for_readback, |
| 91 LayerTreeHostImpl::FrameData* frame); | 93 LayerTreeHostImpl::FrameData* frame); |
| 92 void DidSwapFrame(); | 94 void DidSwapFrame(); |
| 93 | 95 |
| 94 bool ShouldComposite() const; | 96 bool ShouldComposite() const; |
| 95 | 97 |
| 96 // Accessed on main thread only. | 98 // Accessed on main thread only. |
| 97 LayerTreeHost* layer_tree_host_; | 99 LayerTreeHost* layer_tree_host_; |
| 98 bool created_offscreen_context_provider_; | 100 bool created_offscreen_context_provider_; |
| 99 | 101 |
| 100 // Holds the first output surface passed from Start. Should not be used for | 102 // Holds the first output surface passed from Start. Should not be used for |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 private: | 172 private: |
| 171 DebugScopedSetImplThread impl_thread_; | 173 DebugScopedSetImplThread impl_thread_; |
| 172 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 174 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 173 | 175 |
| 174 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 176 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 } // namespace cc | 179 } // namespace cc |
| 178 | 180 |
| 179 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 181 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |