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<cc::MainThreadTaskRunner> 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 base::TimeTicks monotonic_frame_begin_time; | 51 base::TimeTicks monotonic_frame_begin_time; |
51 scoped_ptr<ScrollAndScaleSet> scroll_info; | 52 scoped_ptr<ScrollAndScaleSet> scroll_info; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 224 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
224 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; | 225 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; |
225 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 226 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
226 virtual void DidBeginImplFrameDeadline() OVERRIDE; | 227 virtual void DidBeginImplFrameDeadline() OVERRIDE; |
227 | 228 |
228 // ResourceUpdateControllerClient implementation | 229 // ResourceUpdateControllerClient implementation |
229 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 230 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
230 | 231 |
231 protected: | 232 protected: |
232 ThreadProxy(LayerTreeHost* layer_tree_host, | 233 ThreadProxy(LayerTreeHost* layer_tree_host, |
| 234 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner, |
233 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 235 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
234 | 236 |
235 private: | 237 private: |
236 // Called on main thread. | 238 // Called on main thread. |
237 void SetRendererCapabilitiesMainThreadCopy( | 239 void SetRendererCapabilitiesMainThreadCopy( |
238 const RendererCapabilities& capabilities); | 240 const RendererCapabilities& capabilities); |
239 void BeginMainFrame( | 241 void BeginMainFrame( |
240 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); | 242 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); |
241 void DidCommitAndDrawFrame(); | 243 void DidCommitAndDrawFrame(); |
242 void DidCompleteSwapBuffers(); | 244 void DidCompleteSwapBuffers(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 298 |
297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 299 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 300 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
299 | 301 |
300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 302 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
301 }; | 303 }; |
302 | 304 |
303 } // namespace cc | 305 } // namespace cc |
304 | 306 |
305 #endif // CC_TREES_THREAD_PROXY_H_ | 307 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |