| 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/input/browser_controls_state.h" | 10 #include "cc/input/browser_controls_state.h" |
| 11 #include "cc/trees/channel_main.h" | 11 #include "cc/trees/channel_main.h" |
| 12 #include "cc/trees/proxy.h" | 12 #include "cc/trees/proxy.h" |
| 13 #include "cc/trees/proxy_common.h" | 13 #include "cc/trees/proxy_common.h" |
| 14 #include "cc/trees/remote_proto_channel.h" | |
| 15 | 14 |
| 16 namespace cc { | 15 namespace cc { |
| 17 | 16 |
| 18 class MutatorEvents; | 17 class MutatorEvents; |
| 19 class BeginFrameSource; | 18 class BeginFrameSource; |
| 20 class ChannelMain; | 19 class ChannelMain; |
| 21 class CompositorFrameSink; | 20 class CompositorFrameSink; |
| 22 class LayerTreeHostInProcess; | 21 class LayerTreeHostInProcess; |
| 23 class LayerTreeMutator; | 22 class LayerTreeMutator; |
| 24 | 23 |
| 25 // This class aggregates all interactions that the impl side of the compositor | 24 // This class aggregates all interactions that the impl side of the compositor |
| 26 // needs to have with the main side. | 25 // needs to have with the main side. |
| 27 // The class is created and lives on the main thread. | 26 // The class is created and lives on the main thread. |
| 28 class CC_EXPORT ProxyMain : public Proxy { | 27 class CC_EXPORT ProxyMain : public Proxy { |
| 29 public: | 28 public: |
| 30 static std::unique_ptr<ProxyMain> CreateThreaded( | 29 static std::unique_ptr<ProxyMain> CreateThreaded( |
| 31 LayerTreeHostInProcess* layer_tree_host, | 30 LayerTreeHostInProcess* layer_tree_host, |
| 32 TaskRunnerProvider* task_runner_provider); | 31 TaskRunnerProvider* task_runner_provider); |
| 33 | 32 |
| 34 static std::unique_ptr<ProxyMain> CreateRemote( | |
| 35 RemoteProtoChannel* remote_proto_channel, | |
| 36 LayerTreeHostInProcess* layer_tree_host, | |
| 37 TaskRunnerProvider* task_runner_provider); | |
| 38 | |
| 39 ~ProxyMain() override; | 33 ~ProxyMain() override; |
| 40 | 34 |
| 41 // Commits between the main and impl threads are processed through a pipeline | 35 // Commits between the main and impl threads are processed through a pipeline |
| 42 // with the following stages. For efficiency we can early out at any stage if | 36 // with the following stages. For efficiency we can early out at any stage if |
| 43 // we decide that no further processing is necessary. | 37 // we decide that no further processing is necessary. |
| 44 enum CommitPipelineStage { | 38 enum CommitPipelineStage { |
| 45 NO_PIPELINE_STAGE, | 39 NO_PIPELINE_STAGE, |
| 46 ANIMATE_PIPELINE_STAGE, | 40 ANIMATE_PIPELINE_STAGE, |
| 47 UPDATE_LAYERS_PIPELINE_STAGE, | 41 UPDATE_LAYERS_PIPELINE_STAGE, |
| 48 COMMIT_PIPELINE_STAGE, | 42 COMMIT_PIPELINE_STAGE, |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 bool defer_commits_; | 131 bool defer_commits_; |
| 138 | 132 |
| 139 std::unique_ptr<ChannelMain> channel_main_; | 133 std::unique_ptr<ChannelMain> channel_main_; |
| 140 | 134 |
| 141 DISALLOW_COPY_AND_ASSIGN(ProxyMain); | 135 DISALLOW_COPY_AND_ASSIGN(ProxyMain); |
| 142 }; | 136 }; |
| 143 | 137 |
| 144 } // namespace cc | 138 } // namespace cc |
| 145 | 139 |
| 146 #endif // CC_TREES_PROXY_MAIN_H_ | 140 #endif // CC_TREES_PROXY_MAIN_H_ |
| OLD | NEW |