OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TREES_PROXY_MAIN_H_ | 5 #ifndef CC_TREES_PROXY_MAIN_H_ |
6 #define CC_TREES_PROXY_MAIN_H_ | 6 #define CC_TREES_PROXY_MAIN_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/debug/frame_timing_tracker.h" | 10 #include "cc/debug/frame_timing_tracker.h" |
11 #include "cc/input/top_controls_state.h" | 11 #include "cc/input/top_controls_state.h" |
12 #include "cc/output/output_surface.h" | 12 #include "cc/output/output_surface.h" |
13 #include "cc/output/renderer_capabilities.h" | 13 #include "cc/output/renderer_capabilities.h" |
14 #include "cc/trees/channel_main.h" | 14 #include "cc/trees/channel_main.h" |
15 #include "cc/trees/proxy.h" | 15 #include "cc/trees/proxy.h" |
16 #include "cc/trees/proxy_common.h" | 16 #include "cc/trees/proxy_common.h" |
| 17 #include "cc/trees/remote_proto_channel.h" |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 | 20 |
20 class AnimationEvents; | 21 class AnimationEvents; |
21 class BeginFrameSource; | 22 class BeginFrameSource; |
22 class ChannelMain; | 23 class ChannelMain; |
23 class LayerTreeHost; | 24 class LayerTreeHost; |
24 | 25 |
25 // This class aggregates all interactions that the impl side of the compositor | 26 // This class aggregates all interactions that the impl side of the compositor |
26 // needs to have with the main side. | 27 // needs to have with the main side. |
27 // The class is created and lives on the main thread. | 28 // The class is created and lives on the main thread. |
28 class CC_EXPORT ProxyMain : public Proxy { | 29 class CC_EXPORT ProxyMain : public Proxy { |
29 public: | 30 public: |
30 static scoped_ptr<ProxyMain> CreateThreaded( | 31 static scoped_ptr<ProxyMain> CreateThreaded( |
31 LayerTreeHost* layer_tree_host, | 32 LayerTreeHost* layer_tree_host, |
32 TaskRunnerProvider* task_runner_provider); | 33 TaskRunnerProvider* task_runner_provider); |
33 | 34 |
| 35 static scoped_ptr<ProxyMain> CreateRemote( |
| 36 RemoteProtoChannel* remote_proto_channel, |
| 37 LayerTreeHost* layer_tree_host, |
| 38 TaskRunnerProvider* task_runner_provider); |
| 39 |
34 ~ProxyMain() override; | 40 ~ProxyMain() override; |
35 | 41 |
36 // Commits between the main and impl threads are processed through a pipeline | 42 // Commits between the main and impl threads are processed through a pipeline |
37 // with the following stages. For efficiency we can early out at any stage if | 43 // with the following stages. For efficiency we can early out at any stage if |
38 // we decide that no further processing is necessary. | 44 // we decide that no further processing is necessary. |
39 enum CommitPipelineStage { | 45 enum CommitPipelineStage { |
40 NO_PIPELINE_STAGE, | 46 NO_PIPELINE_STAGE, |
41 ANIMATE_PIPELINE_STAGE, | 47 ANIMATE_PIPELINE_STAGE, |
42 UPDATE_LAYERS_PIPELINE_STAGE, | 48 UPDATE_LAYERS_PIPELINE_STAGE, |
43 COMMIT_PIPELINE_STAGE, | 49 COMMIT_PIPELINE_STAGE, |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 RendererCapabilities renderer_capabilities_; | 151 RendererCapabilities renderer_capabilities_; |
146 | 152 |
147 scoped_ptr<ChannelMain> channel_main_; | 153 scoped_ptr<ChannelMain> channel_main_; |
148 | 154 |
149 DISALLOW_COPY_AND_ASSIGN(ProxyMain); | 155 DISALLOW_COPY_AND_ASSIGN(ProxyMain); |
150 }; | 156 }; |
151 | 157 |
152 } // namespace cc | 158 } // namespace cc |
153 | 159 |
154 #endif // CC_TREES_PROXY_MAIN_H_ | 160 #endif // CC_TREES_PROXY_MAIN_H_ |
OLD | NEW |