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 #include "cc/trees/remote_proto_channel.h" |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 | 20 |
21 class AnimationEvents; | 21 class AnimationEvents; |
22 class BeginFrameSource; | 22 class BeginFrameSource; |
23 class ChannelMain; | 23 class ChannelMain; |
24 class LayerTreeHost; | 24 class LayerTreeHost; |
| 25 class LayerTreeMutator; |
25 | 26 |
26 // This class aggregates all interactions that the impl side of the compositor | 27 // This class aggregates all interactions that the impl side of the compositor |
27 // needs to have with the main side. | 28 // needs to have with the main side. |
28 // The class is created and lives on the main thread. | 29 // The class is created and lives on the main thread. |
29 class CC_EXPORT ProxyMain : public Proxy { | 30 class CC_EXPORT ProxyMain : public Proxy { |
30 public: | 31 public: |
31 static std::unique_ptr<ProxyMain> CreateThreaded( | 32 static std::unique_ptr<ProxyMain> CreateThreaded( |
32 LayerTreeHost* layer_tree_host, | 33 LayerTreeHost* layer_tree_host, |
33 TaskRunnerProvider* task_runner_provider); | 34 TaskRunnerProvider* task_runner_provider); |
34 | 35 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void SetNextCommitWaitsForActivation() override; | 102 void SetNextCommitWaitsForActivation() override; |
102 void NotifyInputThrottledUntilCommit() override; | 103 void NotifyInputThrottledUntilCommit() override; |
103 void SetDeferCommits(bool defer_commits) override; | 104 void SetDeferCommits(bool defer_commits) override; |
104 bool CommitRequested() const override; | 105 bool CommitRequested() const override; |
105 bool BeginMainFrameRequested() const override; | 106 bool BeginMainFrameRequested() const override; |
106 void MainThreadHasStoppedFlinging() override; | 107 void MainThreadHasStoppedFlinging() override; |
107 void Start( | 108 void Start( |
108 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override; | 109 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override; |
109 void Stop() override; | 110 void Stop() override; |
110 bool SupportsImplScrolling() const override; | 111 bool SupportsImplScrolling() const override; |
| 112 void SetMutator(std::unique_ptr<LayerTreeMutator> mutator) override; |
111 bool MainFrameWillHappenForTesting() override; | 113 bool MainFrameWillHappenForTesting() override; |
112 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; | 114 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
113 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; | 115 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; |
114 void ReleaseOutputSurface() override; | 116 void ReleaseOutputSurface() override; |
115 void UpdateTopControlsState(TopControlsState constraints, | 117 void UpdateTopControlsState(TopControlsState constraints, |
116 TopControlsState current, | 118 TopControlsState current, |
117 bool animate) override; | 119 bool animate) override; |
118 void SetOutputIsSecure(bool output_is_secure) override; | 120 void SetOutputIsSecure(bool output_is_secure) override; |
119 | 121 |
120 // This sets the channel used by ProxyMain to communicate with ProxyImpl. | 122 // This sets the channel used by ProxyMain to communicate with ProxyImpl. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 RendererCapabilities renderer_capabilities_; | 155 RendererCapabilities renderer_capabilities_; |
154 | 156 |
155 std::unique_ptr<ChannelMain> channel_main_; | 157 std::unique_ptr<ChannelMain> channel_main_; |
156 | 158 |
157 DISALLOW_COPY_AND_ASSIGN(ProxyMain); | 159 DISALLOW_COPY_AND_ASSIGN(ProxyMain); |
158 }; | 160 }; |
159 | 161 |
160 } // namespace cc | 162 } // namespace cc |
161 | 163 |
162 #endif // CC_TREES_PROXY_MAIN_H_ | 164 #endif // CC_TREES_PROXY_MAIN_H_ |
OLD | NEW |