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

Side by Side Diff: cc/blimp/layer_tree_host_remote.h

Issue 2375363002: cc/blimp: Set up the framework for state serialization. (Closed)
Patch Set: test update Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « cc/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 5 #ifndef CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
6 #define CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 6 #define CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/blimp/remote_compositor_bridge_client.h" 11 #include "cc/blimp/remote_compositor_bridge_client.h"
12 #include "cc/debug/layer_tree_debug_state.h" 12 #include "cc/debug/layer_tree_debug_state.h"
13 #include "cc/trees/layer_tree_host.h" 13 #include "cc/trees/layer_tree_host.h"
14 #include "cc/trees/layer_tree_settings.h" 14 #include "cc/trees/layer_tree_settings.h"
15 #include "cc/trees/surface_sequence_generator.h" 15 #include "cc/trees/surface_sequence_generator.h"
16 #include "cc/trees/swap_promise_manager.h" 16 #include "cc/trees/swap_promise_manager.h"
17 17
18 namespace base { 18 namespace base {
19 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
20 } // namespace base 20 } // namespace base
21 21
22 namespace cc { 22 namespace cc {
23 namespace proto {
24 class LayerTreeHost;
25 } // namespace proto
26
23 class AnimationHost; 27 class AnimationHost;
24 class RemoteCompositorBridge; 28 class RemoteCompositorBridge;
25 class LayerTreeHostClient; 29 class LayerTreeHostClient;
26 30
27 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost, 31 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost,
28 public RemoteCompositorBridgeClient { 32 public RemoteCompositorBridgeClient {
29 public: 33 public:
30 struct CC_EXPORT InitParams { 34 struct CC_EXPORT InitParams {
31 LayerTreeHostClient* client = nullptr; 35 LayerTreeHostClient* client = nullptr;
32 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner; 36 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 private: 100 private:
97 enum class FramePipelineStage { NONE, ANIMATE, UPDATE_LAYERS, COMMIT }; 101 enum class FramePipelineStage { NONE, ANIMATE, UPDATE_LAYERS, COMMIT };
98 102
99 // RemoteCompositorBridgeClient implementation. 103 // RemoteCompositorBridgeClient implementation.
100 void BeginMainFrame() override; 104 void BeginMainFrame() override;
101 105
102 void MainFrameRequested(FramePipelineStage requested_pipeline_stage); 106 void MainFrameRequested(FramePipelineStage requested_pipeline_stage);
103 void ScheduleMainFrameIfNecessary(); 107 void ScheduleMainFrameIfNecessary();
104 void MainFrameComplete(); 108 void MainFrameComplete();
105 void DispatchDrawAndSwapCallbacks(); 109 void DispatchDrawAndSwapCallbacks();
110 void SerializeCurrentState(proto::LayerTreeHost* layer_tree_host_proto);
106 111
107 const int id_; 112 const int id_;
108 int source_frame_number_ = 0; 113 int source_frame_number_ = 0;
109 bool visible_ = false; 114 bool visible_ = false;
110 bool defer_commits_ = false; 115 bool defer_commits_ = false;
111 116
112 // Set to true if a main frame request is pending on the 117 // Set to true if a main frame request is pending on the
113 // RemoteCompositorBridge. 118 // RemoteCompositorBridge.
114 bool main_frame_requested_from_bridge_ = false; 119 bool main_frame_requested_from_bridge_ = false;
115 120
(...skipping 26 matching lines...) Expand all
142 SurfaceSequenceGenerator surface_sequence_generator_; 147 SurfaceSequenceGenerator surface_sequence_generator_;
143 148
144 base::WeakPtr<InputHandler> input_handler_weak_ptr_; 149 base::WeakPtr<InputHandler> input_handler_weak_ptr_;
145 150
146 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_; 151 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_;
147 }; 152 };
148 153
149 } // namespace cc 154 } // namespace cc
150 155
151 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ 156 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_
OLDNEW
« no previous file with comments | « cc/blimp/layer_factory.h ('k') | cc/blimp/layer_tree_host_remote.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698