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

Unified Diff: cc/trees/layer_tree_host.h

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/compositor_mode.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 52d33215916e2c8088a4ab911dcc588d2954c1ac..43bea66d5a92dcd99548b01e1b66417ae32b310f 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -63,6 +63,7 @@ class LayerTreeHostImplClient;
class LayerTreeHostSingleThreadClient;
class PropertyTrees;
class Region;
+class RemoteProtoChannel;
class RenderingStatsInstrumentation;
class ResourceProvider;
class ResourceUpdateQueue;
@@ -103,6 +104,22 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
LayerTreeHostSingleThreadClient* single_thread_client,
InitParams* params);
+
+ static scoped_ptr<LayerTreeHost> CreateRemoteServer(
+ RemoteProtoChannel* remote_proto_channel,
+ InitParams* params);
+
+ // The lifetime of this LayerTreeHost is tied to the lifetime of the remote
+ // server LayerTreeHost. It should be created on receiving
+ // CompositorMessageToImpl::InitializeImpl message and destroyed on receiving
+ // a CompositorMessageToImpl::CloseImpl message from the server. This ensures
+ // that the client will not send any compositor messages once the
+ // LayerTreeHost on the server is destroyed.
+ static scoped_ptr<LayerTreeHost> CreateRemoteClient(
+ RemoteProtoChannel* remote_proto_channel,
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
+ InitParams* params);
+
virtual ~LayerTreeHost();
// LayerTreeHost interface to Proxy.
@@ -382,6 +399,11 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
// the protobuf, the normal commit-flow should continue.
void FromProtobufForCommit(const proto::LayerTreeHost& proto);
+ bool IsSingleThreaded() const;
+ bool IsThreaded() const;
+ bool IsRemoteServer() const;
+ bool IsRemoteClient() const;
+
protected:
LayerTreeHost(InitParams* params, CompositorMode mode);
void InitializeThreaded(
@@ -392,6 +414,13 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
LayerTreeHostSingleThreadClient* single_thread_client,
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_ptr<BeginFrameSource> external_begin_frame_source);
+ void InitializeRemoteServer(
+ RemoteProtoChannel* remote_proto_channel,
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
+ void InitializeRemoteClient(
+ RemoteProtoChannel* remote_proto_channel,
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
void InitializeForTesting(
scoped_ptr<TaskRunnerProvider> task_runner_provider,
scoped_ptr<Proxy> proxy_for_testing,
@@ -431,9 +460,6 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
bool AnimateLayersRecursive(Layer* current, base::TimeTicks time);
- bool IsSingleThreaded() const;
- bool IsThreaded() const;
-
struct UIResourceClientData {
UIResourceClient* client;
gfx::Size size;
« no previous file with comments | « cc/trees/compositor_mode.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698