Chromium Code Reviews| Index: cc/trees/layer_tree_host.h |
| diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h |
| index f7bd43368c3abde927cf59c358cf6ea2273b141b..855871ee9ab2b5ec137b0c2a2734fee6fdf53cfc 100644 |
| --- a/cc/trees/layer_tree_host.h |
| +++ b/cc/trees/layer_tree_host.h |
| @@ -61,6 +61,7 @@ class LayerTreeHostImplClient; |
| class LayerTreeHostSingleThreadClient; |
| class PropertyTrees; |
| class Region; |
| +class RemoteProtoChannel; |
| class RenderingStatsInstrumentation; |
| class ResourceProvider; |
| class ResourceUpdateQueue; |
| @@ -97,8 +98,30 @@ 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(); |
| + // Should be called only for the remote mode. |
| + void ToProtobuf(); |
| + |
| + // Should be called only for the deserializable mode. |
|
vmpstr
2016/01/11 21:50:15
This isn't a mode anymore, can you update the comm
Khushal
2016/01/13 02:07:12
I'll just remove these. Tommy is already working o
|
| + void FromProtobuf(); |
| + |
| // LayerTreeHost interface to Proxy. |
| void WillBeginMainFrame(); |
| void DidBeginMainFrame(); |
| @@ -376,6 +399,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, |
| @@ -415,6 +445,8 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { |
| bool IsSingleThreaded() const; |
| bool IsThreaded() const; |
| + bool IsRemoteServer() const; |
| + bool IsRemoteClient() const; |
| struct UIResourceClientData { |
| UIResourceClient* client; |