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

Unified Diff: cc/trees/thread_proxy.h

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/task_runner_provider.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.h
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 0b954bd7bd5128944dbae6bd1355f13bcfc7269b..6ebbd4c8e09f0d906e1d8b97bb0c8772cda42a92 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -45,8 +45,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
public:
static scoped_ptr<Proxy> Create(
LayerTreeHost* layer_tree_host,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
+ TaskRunnerProvider* task_runner_provider,
scoped_ptr<BeginFrameSource> external_begin_frame_source);
~ThreadProxy() override;
@@ -151,6 +150,7 @@ class CC_EXPORT ThreadProxy : public Proxy,
const MainThreadOnly& main() const;
const CompositorThreadOnly& impl() const;
+ TaskRunnerProvider* task_runner_provider() { return task_runner_provider_; }
// Proxy implementation
void FinishAllRendering() override;
@@ -239,11 +239,9 @@ class CC_EXPORT ThreadProxy : public Proxy,
void SetChannel(scoped_ptr<ThreadedChannel> threaded_channel) override;
protected:
- ThreadProxy(
- LayerTreeHost* layer_tree_host,
- scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
- scoped_ptr<BeginFrameSource> external_begin_frame_source);
+ ThreadProxy(LayerTreeHost* layer_tree_host,
+ TaskRunnerProvider* task_runner_provider,
+ scoped_ptr<BeginFrameSource> external_begin_frame_source);
private:
friend class ThreadProxyForTest;
@@ -306,6 +304,8 @@ class CC_EXPORT ThreadProxy : public Proxy,
DrawResult DrawSwapInternal(bool forced_draw);
+ TaskRunnerProvider* task_runner_provider_;
+
// Use accessors instead of this variable directly.
MainThreadOnly main_thread_only_vars_unsafe_;
MainThreadOnly& main();
« no previous file with comments | « cc/trees/task_runner_provider.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698