| 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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_SINGLE_THREAD_PROXY_H_ |
| 6 #define CC_SINGLE_THREAD_PROXY_H_ | 6 #define CC_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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 base::Time wall_clock_time) OVERRIDE; | 68 base::Time wall_clock_time) OVERRIDE; |
| 69 virtual bool ReduceContentsTextureMemoryOnImplThread( | 69 virtual bool ReduceContentsTextureMemoryOnImplThread( |
| 70 size_t limit_bytes, | 70 size_t limit_bytes, |
| 71 int priority_cutoff) OVERRIDE; | 71 int priority_cutoff) OVERRIDE; |
| 72 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; | 72 virtual void ReduceWastedContentsTextureMemoryOnImplThread() OVERRIDE; |
| 73 virtual void SendManagedMemoryStats() OVERRIDE; | 73 virtual void SendManagedMemoryStats() OVERRIDE; |
| 74 virtual bool IsInsideDraw() OVERRIDE; | 74 virtual bool IsInsideDraw() OVERRIDE; |
| 75 virtual void RenewTreePriority() OVERRIDE {} | 75 virtual void RenewTreePriority() OVERRIDE {} |
| 76 | 76 |
| 77 // Called by the legacy path where RenderWidget does the scheduling. | 77 // Called by the legacy path where RenderWidget does the scheduling. |
| 78 void CompositeImmediately(); | 78 void CompositeImmediately(base::TimeTicks frame_begin_time); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host); | 81 explicit SingleThreadProxy(LayerTreeHost* layer_tree_host); |
| 82 | 82 |
| 83 bool CommitAndComposite(); | 83 bool CommitAndComposite(base::TimeTicks frame_begin_time); |
| 84 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); | 84 void DoCommit(scoped_ptr<ResourceUpdateQueue> queue); |
| 85 bool DoComposite( | 85 bool DoComposite( |
| 86 scoped_refptr<cc::ContextProvider> offscreen_context_provider); | 86 scoped_refptr<cc::ContextProvider> offscreen_context_provider, |
| 87 base::TimeTicks frame_begin_time); |
| 87 void DidSwapFrame(); | 88 void DidSwapFrame(); |
| 88 | 89 |
| 89 // Accessed on main thread only. | 90 // Accessed on main thread only. |
| 90 LayerTreeHost* layer_tree_host_; | 91 LayerTreeHost* layer_tree_host_; |
| 91 bool output_surface_lost_; | 92 bool output_surface_lost_; |
| 92 bool created_offscreen_context_provider; | 93 bool created_offscreen_context_provider; |
| 93 | 94 |
| 94 // Holds on to the context between initializeContext() and | 95 // Holds on to the context between initializeContext() and |
| 95 // InitializeRenderer() calls. Shouldn't be used for anything else. | 96 // InitializeRenderer() calls. Shouldn't be used for anything else. |
| 96 scoped_ptr<OutputSurface> output_surface_before_initialization_; | 97 scoped_ptr<OutputSurface> output_surface_before_initialization_; |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 private: | 169 private: |
| 169 DebugScopedSetImplThread impl_thread_; | 170 DebugScopedSetImplThread impl_thread_; |
| 170 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 171 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
| 171 | 172 |
| 172 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 173 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
| 173 }; | 174 }; |
| 174 | 175 |
| 175 } // namespace cc | 176 } // namespace cc |
| 176 | 177 |
| 177 #endif // CC_SINGLE_THREAD_PROXY_H_ | 178 #endif // CC_SINGLE_THREAD_PROXY_H_ |
| OLD | NEW |