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

Unified Diff: cc/trees/proxy_main.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LayerTreeSettings::ToProtobuf, update comments. Created 5 years 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/proxy_main.cc
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index dd5ac1afe5e6784188386ddec36905c46af43d1d..ac94309720925d29f2b500bde85df288ad71d838 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -16,6 +16,7 @@
#include "cc/output/swap_promise.h"
#include "cc/trees/blocking_task_runner.h"
#include "cc/trees/layer_tree_host.h"
+#include "cc/trees/remote_channel_main.h"
#include "cc/trees/scoped_abort_remaining_swap_promises.h"
#include "cc/trees/threaded_channel.h"
@@ -33,6 +34,17 @@ scoped_ptr<ProxyMain> ProxyMain::CreateThreaded(
return proxy_main;
}
+scoped_ptr<ProxyMain> ProxyMain::CreateRemote(
+ RemoteProtoChannel* remote_proto_channel,
+ LayerTreeHost* layer_tree_host,
+ TaskRunnerProvider* task_runner_provider) {
+ scoped_ptr<ProxyMain> proxy_main(
+ new ProxyMain(layer_tree_host, task_runner_provider, nullptr));
+ proxy_main->SetChannel(RemoteChannelMain::Create(
+ remote_proto_channel, proxy_main.get(), task_runner_provider));
+ return proxy_main;
+}
+
ProxyMain::ProxyMain(LayerTreeHost* layer_tree_host,
TaskRunnerProvider* task_runner_provider,
scoped_ptr<BeginFrameSource> external_begin_frame_source)
@@ -382,7 +394,6 @@ void ProxyMain::MainThreadHasStoppedFlinging() {
void ProxyMain::Start() {
DCHECK(IsMainThread());
- DCHECK(task_runner_provider_->HasImplThread());
DCHECK(channel_main_);
// Create LayerTreeHostImpl.

Powered by Google App Engine
This is Rietveld 408576698