| 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_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_THREAD_PROXY_H_ |
| 6 #define CC_TREES_THREAD_PROXY_H_ | 6 #define CC_TREES_THREAD_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class Scheduler; | 32 class Scheduler; |
| 33 class ScopedThreadProxy; | 33 class ScopedThreadProxy; |
| 34 | 34 |
| 35 class CC_EXPORT ThreadProxy : public Proxy, | 35 class CC_EXPORT ThreadProxy : public Proxy, |
| 36 NON_EXPORTED_BASE(LayerTreeHostImplClient), | 36 NON_EXPORTED_BASE(LayerTreeHostImplClient), |
| 37 NON_EXPORTED_BASE(SchedulerClient), | 37 NON_EXPORTED_BASE(SchedulerClient), |
| 38 NON_EXPORTED_BASE(ResourceUpdateControllerClient) { | 38 NON_EXPORTED_BASE(ResourceUpdateControllerClient) { |
| 39 public: | 39 public: |
| 40 static scoped_ptr<Proxy> Create( | 40 static scoped_ptr<Proxy> Create( |
| 41 LayerTreeHost* layer_tree_host, | 41 LayerTreeHost* layer_tree_host, |
| 42 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 42 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 43 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
| 43 | 44 |
| 44 virtual ~ThreadProxy(); | 45 virtual ~ThreadProxy(); |
| 45 | 46 |
| 46 struct BeginMainFrameAndCommitState { | 47 struct BeginMainFrameAndCommitState { |
| 47 BeginMainFrameAndCommitState(); | 48 BeginMainFrameAndCommitState(); |
| 48 ~BeginMainFrameAndCommitState(); | 49 ~BeginMainFrameAndCommitState(); |
| 49 | 50 |
| 50 unsigned int begin_frame_id; | 51 unsigned int begin_frame_id; |
| 51 base::TimeTicks monotonic_frame_begin_time; | 52 base::TimeTicks monotonic_frame_begin_time; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 225 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
| 225 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; | 226 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; |
| 226 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 227 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
| 227 virtual void DidBeginImplFrameDeadline() OVERRIDE; | 228 virtual void DidBeginImplFrameDeadline() OVERRIDE; |
| 228 | 229 |
| 229 // ResourceUpdateControllerClient implementation | 230 // ResourceUpdateControllerClient implementation |
| 230 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 231 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
| 231 | 232 |
| 232 protected: | 233 protected: |
| 233 ThreadProxy(LayerTreeHost* layer_tree_host, | 234 ThreadProxy(LayerTreeHost* layer_tree_host, |
| 235 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 234 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 236 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
| 235 | 237 |
| 236 private: | 238 private: |
| 237 // Called on main thread. | 239 // Called on main thread. |
| 238 void SetRendererCapabilitiesMainThreadCopy( | 240 void SetRendererCapabilitiesMainThreadCopy( |
| 239 const RendererCapabilities& capabilities); | 241 const RendererCapabilities& capabilities); |
| 240 void BeginMainFrame( | 242 void BeginMainFrame( |
| 241 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 243 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
| 242 void DidCommitAndDrawFrame(); | 244 void DidCommitAndDrawFrame(); |
| 243 void DidCompleteSwapBuffers(); | 245 void DidCompleteSwapBuffers(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 299 |
| 298 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 300 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 299 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 301 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 300 | 302 |
| 301 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 303 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 302 }; | 304 }; |
| 303 | 305 |
| 304 } // namespace cc | 306 } // namespace cc |
| 305 | 307 |
| 306 #endif // CC_TREES_THREAD_PROXY_H_ | 308 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |