OLD | NEW |
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/compositor_proto_state_sink_client.h" | 11 #include "cc/blimp/compositor_proto_state_sink_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 CompositorProtoStateSink; | 28 class CompositorProtoStateSink; |
25 class LayerTreeHostClient; | 29 class LayerTreeHostClient; |
26 | 30 |
27 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost, | 31 class CC_EXPORT LayerTreeHostRemote : public LayerTreeHost, |
28 public CompositorProtoStateSinkClient { | 32 public CompositorProtoStateSinkClient { |
29 public: | 33 public: |
30 // The remote LayerTreeHost doesn't perform any compositing, so we don't need | 34 // The remote LayerTreeHost doesn't perform any compositing, so we don't need |
31 // any resources (OutputSurface, TaskGraphRunner, etc.) needed by the | 35 // any resources (OutputSurface, TaskGraphRunner, etc.) needed by the |
32 // compositor. | 36 // compositor. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 105 |
102 // CompositorProtoStateSinkClient implementation. | 106 // CompositorProtoStateSinkClient implementation. |
103 void BeginMainFrame() override; | 107 void BeginMainFrame() override; |
104 | 108 |
105 base::SingleThreadTaskRunner* MainTaskRunner(); | 109 base::SingleThreadTaskRunner* MainTaskRunner(); |
106 | 110 |
107 void MainFrameRequested(FramePipelineStage requested_pipeline_stage); | 111 void MainFrameRequested(FramePipelineStage requested_pipeline_stage); |
108 void ScheduleMainFrameIfNecessary(); | 112 void ScheduleMainFrameIfNecessary(); |
109 void MainFrameComplete(); | 113 void MainFrameComplete(); |
110 void DispatchDrawAndSwapCallbacks(); | 114 void DispatchDrawAndSwapCallbacks(); |
| 115 void SerializeCurrentState(proto::LayerTreeHost* layer_tree_host_proto); |
111 | 116 |
112 int id_; | 117 int id_; |
113 int source_frame_number_; | 118 int source_frame_number_; |
114 bool visible_; | 119 bool visible_; |
115 bool defer_commits_; | 120 bool defer_commits_; |
116 | 121 |
117 // Set to true if a main frame request is pending on the | 122 // Set to true if a main frame request is pending on the |
118 // CompositorProtoStateSink. | 123 // CompositorProtoStateSink. |
119 bool main_frame_requested_from_state_sink_; | 124 bool main_frame_requested_from_state_sink_; |
120 | 125 |
(...skipping 24 matching lines...) Expand all Loading... |
145 SurfaceSequenceGenerator surface_sequence_generator_; | 150 SurfaceSequenceGenerator surface_sequence_generator_; |
146 | 151 |
147 base::WeakPtr<InputHandler> input_handler_weak_ptr_; | 152 base::WeakPtr<InputHandler> input_handler_weak_ptr_; |
148 | 153 |
149 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_; | 154 base::WeakPtrFactory<LayerTreeHostRemote> weak_factory_; |
150 }; | 155 }; |
151 | 156 |
152 } // namespace cc | 157 } // namespace cc |
153 | 158 |
154 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ | 159 #endif // CC_BLIMP_LAYER_TREE_HOST_REMOTE_H_ |
OLD | NEW |