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

Unified Diff: cc/trees/threaded_channel.cc

Issue 1419283002: cc: Split Proxy and TaskRunnerProvider for the LayerTreeHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 years, 1 month 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
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/threaded_channel.cc
diff --git a/cc/trees/threaded_channel.cc b/cc/trees/threaded_channel.cc
index b723f8c612a93f880182836b0887bc76bed6d66c..4c52f4db485c33aa503deec0ce2c39f93551a9e3 100644
--- a/cc/trees/threaded_channel.cc
+++ b/cc/trees/threaded_channel.cc
@@ -12,21 +12,16 @@ namespace cc {
scoped_ptr<ThreadedChannel> ThreadedChannel::Create(
ThreadProxy* thread_proxy,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner) {
+ TaskRunnerProvider* task_runner_provider) {
return make_scoped_ptr(
- new ThreadedChannel(thread_proxy, main_task_runner, impl_task_runner));
+ new ThreadedChannel(thread_proxy, task_runner_provider));
}
-ThreadedChannel::ThreadedChannel(
- ThreadProxy* thread_proxy,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner)
+ThreadedChannel::ThreadedChannel(ThreadProxy* thread_proxy,
+ TaskRunnerProvider* task_runner_provider)
: proxy_main_(thread_proxy),
proxy_impl_(thread_proxy),
- proxy_(thread_proxy),
- main_task_runner_(main_task_runner),
- impl_task_runner_(impl_task_runner) {}
+ task_runner_provider_(task_runner_provider) {}
void ThreadedChannel::SetThrottleFrameProductionOnImpl(bool throttle) {
ImplThreadTaskRunner()->PostTask(
@@ -226,11 +221,11 @@ ThreadedChannel::~ThreadedChannel() {
}
base::SingleThreadTaskRunner* ThreadedChannel::MainThreadTaskRunner() const {
- return main_task_runner_.get();
+ return task_runner_provider_->MainThreadTaskRunner();
}
base::SingleThreadTaskRunner* ThreadedChannel::ImplThreadTaskRunner() const {
- return impl_task_runner_.get();
+ return task_runner_provider_->ImplThreadTaskRunner();
}
} // namespace cc
« no previous file with comments | « cc/trees/threaded_channel.h ('k') | cc/trees/threaded_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698