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

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: 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/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_main.cc
diff --git a/cc/trees/proxy_main.cc b/cc/trees/proxy_main.cc
index 2175e7fb182020dbe9fee68a7cfb5d27fbcd4630..4c3d4a43864ebd01605cd740cf75991b4805e945 100644
--- a/cc/trees/proxy_main.cc
+++ b/cc/trees/proxy_main.cc
@@ -17,6 +17,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"
@@ -32,6 +33,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));
+ 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)
: layer_tree_host_(layer_tree_host),
@@ -378,7 +390,7 @@ void ProxyMain::MainThreadHasStoppedFlinging() {
void ProxyMain::Start(
scoped_ptr<BeginFrameSource> external_begin_frame_source) {
DCHECK(IsMainThread());
- DCHECK(task_runner_provider_->HasImplThread());
+ DCHECK(layer_tree_host_->IsThreaded() || layer_tree_host_->IsRemoteServer());
DCHECK(channel_main_);
DCHECK(!layer_tree_host_->settings().use_external_begin_frame_source ||
external_begin_frame_source);
« no previous file with comments | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698