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

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: 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/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 2dc93ee2bffcb5a45843584253e0d5e988298253..3831cd212b14405651410d4ec586c29d2c26c01e 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -58,6 +58,7 @@ class LayerTreeHostImplClient;
class LayerTreeHostSingleThreadClient;
class PropertyTrees;
class Region;
+class RemoteProtoChannel;
class RenderingStatsInstrumentation;
class ResourceProvider;
class ResourceUpdateQueue;
@@ -94,8 +95,23 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
LayerTreeHostSingleThreadClient* single_thread_client,
InitParams* params);
+
+ static scoped_ptr<LayerTreeHost> CreateRemote(
+ RemoteProtoChannel* remote_proto_channel,
+ InitParams* params);
+
+ static scoped_ptr<LayerTreeHost> CreateDeserializable(
+ 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.
+ void FromProtobuf();
+
// LayerTreeHost interface to Proxy.
void WillBeginMainFrame();
void DidBeginMainFrame();
@@ -373,6 +389,12 @@ 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 InitializeRemote(
+ RemoteProtoChannel* remote_proto_channel,
+ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
+ void InitializeDeserializable(
+ 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);
void SetOutputSurfaceLostForTesting(bool is_lost) {
@@ -408,6 +430,8 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
bool IsSingleThreaded() const;
bool IsThreaded() const;
+ bool IsRemote() const;
+ bool IsDeserializable() const;
struct UIResourceClientData {
UIResourceClient* client;

Powered by Google App Engine
This is Rietveld 408576698