Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: cc/trees/layer_tree_host.h

Issue 363383002: Forward input tasks to the Blink scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. DefaultMainThreadTaskRunner now dispatches properly. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 bool using_shared_memory_resources; 79 bool using_shared_memory_resources;
80 }; 80 };
81 81
82 class CC_EXPORT LayerTreeHost { 82 class CC_EXPORT LayerTreeHost {
83 public: 83 public:
84 // The SharedBitmapManager will be used on the compositor thread. 84 // The SharedBitmapManager will be used on the compositor thread.
85 static scoped_ptr<LayerTreeHost> CreateThreaded( 85 static scoped_ptr<LayerTreeHost> CreateThreaded(
86 LayerTreeHostClient* client, 86 LayerTreeHostClient* client,
87 SharedBitmapManager* manager, 87 SharedBitmapManager* manager,
88 const LayerTreeSettings& settings, 88 const LayerTreeSettings& settings,
89 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
89 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 90 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
90 91
91 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( 92 static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
92 LayerTreeHostClient* client, 93 LayerTreeHostClient* client,
93 LayerTreeHostSingleThreadClient* single_thread_client, 94 LayerTreeHostSingleThreadClient* single_thread_client,
94 SharedBitmapManager* manager, 95 SharedBitmapManager* manager,
95 const LayerTreeSettings& settings); 96 const LayerTreeSettings& settings,
97 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner);
96 virtual ~LayerTreeHost(); 98 virtual ~LayerTreeHost();
97 99
98 void SetLayerTreeHostClientReady(); 100 void SetLayerTreeHostClientReady();
99 101
100 // LayerTreeHost interface to Proxy. 102 // LayerTreeHost interface to Proxy.
103 void ScheduleBeginMainFrameOnImplThread(
104 const base::Closure& begin_main_frame_task);
101 void WillBeginMainFrame() { 105 void WillBeginMainFrame() {
102 client_->WillBeginMainFrame(source_frame_number_); 106 client_->WillBeginMainFrame(source_frame_number_);
103 } 107 }
104 void DidBeginMainFrame(); 108 void DidBeginMainFrame();
105 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time); 109 void UpdateClientAnimations(base::TimeTicks monotonic_frame_begin_time);
106 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time); 110 void AnimateLayers(base::TimeTicks monotonic_frame_begin_time);
107 void DidStopFlinging(); 111 void DidStopFlinging();
108 void Layout(); 112 void Layout();
109 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl); 113 void BeginCommitOnImplThread(LayerTreeHostImpl* host_impl);
110 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl); 114 void FinishCommitOnImplThread(LayerTreeHostImpl* host_impl);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // See swap_promise.h for how to use SwapPromise. 299 // See swap_promise.h for how to use SwapPromise.
296 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 300 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
297 301
298 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 302 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
299 303
300 protected: 304 protected:
301 LayerTreeHost(LayerTreeHostClient* client, 305 LayerTreeHost(LayerTreeHostClient* client,
302 SharedBitmapManager* manager, 306 SharedBitmapManager* manager,
303 const LayerTreeSettings& settings); 307 const LayerTreeSettings& settings);
304 void InitializeThreaded( 308 void InitializeThreaded(
309 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
305 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 310 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
306 void InitializeSingleThreaded( 311 void InitializeSingleThreaded(
307 LayerTreeHostSingleThreadClient* single_thread_client); 312 LayerTreeHostSingleThreadClient* single_thread_client,
313 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner);
308 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); 314 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing);
309 void SetOutputSurfaceLostForTesting(bool is_lost) { 315 void SetOutputSurfaceLostForTesting(bool is_lost) {
310 output_surface_lost_ = is_lost; 316 output_surface_lost_ = is_lost;
311 } 317 }
312 318
313 MicroBenchmarkController micro_benchmark_controller_; 319 MicroBenchmarkController micro_benchmark_controller_;
314 320
315 private: 321 private:
316 void InitializeProxy(scoped_ptr<Proxy> proxy); 322 void InitializeProxy(scoped_ptr<Proxy> proxy);
317 323
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 456
451 ScopedPtrVector<SwapPromise> swap_promise_list_; 457 ScopedPtrVector<SwapPromise> swap_promise_list_;
452 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 458 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
453 459
454 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 460 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
455 }; 461 };
456 462
457 } // namespace cc 463 } // namespace cc
458 464
459 #endif // CC_TREES_LAYER_TREE_HOST_H_ 465 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | cc/trees/thread_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698