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

Unified Diff: cc/trees/layer_tree_host.cc

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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 48f4864ef4a14e903aba2665fa85a989f725ea8a..e7c0fd880c0efaf5e16c5a9262914aaf65b09748 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -68,11 +68,13 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateThreaded(
LayerTreeHostClient* client,
SharedBitmapManager* manager,
const LayerTreeSettings& settings,
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
+ DCHECK(main_task_runner);
DCHECK(impl_task_runner);
scoped_ptr<LayerTreeHost> layer_tree_host(
new LayerTreeHost(client, manager, settings));
- layer_tree_host->InitializeThreaded(impl_task_runner);
+ layer_tree_host->InitializeThreaded(main_task_runner, impl_task_runner);
return layer_tree_host.Pass();
}
@@ -80,10 +82,13 @@ scoped_ptr<LayerTreeHost> LayerTreeHost::CreateSingleThreaded(
LayerTreeHostClient* client,
LayerTreeHostSingleThreadClient* single_thread_client,
SharedBitmapManager* manager,
- const LayerTreeSettings& settings) {
+ const LayerTreeSettings& settings,
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner) {
+ DCHECK(main_task_runner);
scoped_ptr<LayerTreeHost> layer_tree_host(
new LayerTreeHost(client, manager, settings));
- layer_tree_host->InitializeSingleThreaded(single_thread_client);
+ layer_tree_host->InitializeSingleThreaded(single_thread_client,
+ main_task_runner);
return layer_tree_host.Pass();
}
@@ -125,13 +130,19 @@ LayerTreeHost::LayerTreeHost(LayerTreeHostClient* client,
}
void LayerTreeHost::InitializeThreaded(
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
- InitializeProxy(ThreadProxy::Create(this, impl_task_runner));
+ InitializeProxy(ThreadProxy::Create(this,
+ main_task_runner,
+ impl_task_runner));
}
void LayerTreeHost::InitializeSingleThreaded(
- LayerTreeHostSingleThreadClient* single_thread_client) {
- InitializeProxy(SingleThreadProxy::Create(this, single_thread_client));
+ LayerTreeHostSingleThreadClient* single_thread_client,
+ scoped_refptr<cc::MainThreadTaskRunner> main_task_runner) {
+ InitializeProxy(SingleThreadProxy::Create(this,
+ single_thread_client,
+ main_task_runner));
}
void LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) {

Powered by Google App Engine
This is Rietveld 408576698