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

Unified Diff: cc/test/proxy_main_for_test.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed vmpstr's comments. Created 4 years, 11 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
« no previous file with comments | « cc/test/proxy_main_for_test.h ('k') | cc/test/remote_channel_impl_for_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/proxy_main_for_test.cc
diff --git a/cc/test/proxy_main_for_test.cc b/cc/test/proxy_main_for_test.cc
index f0130d68bbb58992a60aaa2453a1a3f7e2484cb8..6a9fa4188bbbd66ac16d127477de4e61be6c9c7d 100644
--- a/cc/test/proxy_main_for_test.cc
+++ b/cc/test/proxy_main_for_test.cc
@@ -6,17 +6,32 @@
#include "cc/animation/animation_events.h"
#include "cc/test/threaded_channel_for_test.h"
+#include "cc/trees/remote_channel_main.h"
namespace cc {
-scoped_ptr<ProxyMain> ProxyMainForTest::CreateThreaded(
+scoped_ptr<ProxyMainForTest> ProxyMainForTest::CreateThreaded(
TestHooks* test_hooks,
LayerTreeHost* host,
TaskRunnerProvider* task_runner_provider) {
- scoped_ptr<ProxyMain> proxy_main(
+ scoped_ptr<ProxyMainForTest> proxy_main(
new ProxyMainForTest(test_hooks, host, task_runner_provider));
- proxy_main->SetChannel(ThreadedChannelForTest::Create(
- test_hooks, proxy_main.get(), task_runner_provider));
+ scoped_ptr<ThreadedChannelForTest> channel = ThreadedChannelForTest::Create(
+ test_hooks, proxy_main.get(), task_runner_provider);
+ proxy_main->threaded_channel_for_test_ = channel.get();
+ proxy_main->SetChannel(std::move(channel));
+ return proxy_main;
+}
+
+scoped_ptr<ProxyMainForTest> ProxyMainForTest::CreateRemote(
+ TestHooks* test_hooks,
+ RemoteProtoChannel* remote_proto_channel,
+ LayerTreeHost* host,
+ TaskRunnerProvider* task_runner_provider) {
+ scoped_ptr<ProxyMainForTest> proxy_main(
+ new ProxyMainForTest(test_hooks, host, task_runner_provider));
+ proxy_main->SetChannel(RemoteChannelMain::Create(
+ remote_proto_channel, proxy_main.get(), task_runner_provider));
return proxy_main;
}
@@ -25,7 +40,9 @@ ProxyMainForTest::~ProxyMainForTest() {}
ProxyMainForTest::ProxyMainForTest(TestHooks* test_hooks,
LayerTreeHost* host,
TaskRunnerProvider* task_runner_provider)
- : ProxyMain(host, task_runner_provider), test_hooks_(test_hooks) {}
+ : ProxyMain(host, task_runner_provider),
+ test_hooks_(test_hooks),
+ threaded_channel_for_test_(nullptr) {}
void ProxyMainForTest::SetNeedsUpdateLayers() {
ProxyMain::SetNeedsUpdateLayers();
« no previous file with comments | « cc/test/proxy_main_for_test.h ('k') | cc/test/remote_channel_impl_for_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698