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_IMPL_H_ | 5 #ifndef CC_TREES_PROXY_IMPL_H_ |
6 #define CC_TREES_PROXY_IMPL_H_ | 6 #define CC_TREES_PROXY_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "cc/base/completion_event.h" | 11 #include "cc/base/completion_event.h" |
12 #include "cc/base/delayed_unique_notifier.h" | 12 #include "cc/base/delayed_unique_notifier.h" |
13 #include "cc/input/top_controls_state.h" | 13 #include "cc/input/top_controls_state.h" |
14 #include "cc/scheduler/scheduler.h" | 14 #include "cc/scheduler/scheduler.h" |
15 #include "cc/trees/channel_impl.h" | 15 #include "cc/trees/channel_impl.h" |
16 #include "cc/trees/layer_tree_host_impl.h" | 16 #include "cc/trees/layer_tree_host_impl.h" |
17 | 17 |
18 namespace cc { | 18 namespace cc { |
19 class LayerTreeHostInProcess; | 19 class LayerTreeHostInProcess; |
20 | 20 |
21 // This class aggregates all the interactions that the main side of the | 21 // This class aggregates all the interactions that the main side of the |
22 // compositor needs to have with the impl side. It is created and owned by the | 22 // compositor needs to have with the impl side. It is created and owned by the |
23 // ChannelImpl implementation. The class lives entirely on the impl thread. | 23 // ChannelImpl implementation. The class lives entirely on the impl thread. |
24 class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient), | 24 class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient), |
25 public NON_EXPORTED_BASE(SchedulerClient) { | 25 public NON_EXPORTED_BASE(SchedulerClient) { |
26 public: | 26 public: |
27 ProxyImpl(ChannelImpl* channel_impl, | 27 ProxyImpl(ChannelImpl* channel_impl, |
28 LayerTreeHostInProcess* layer_tree_host, | 28 LayerTreeHostInProcess* layer_tree_host, |
29 TaskRunnerProvider* task_runner_provider, | 29 TaskRunnerProvider* task_runner_provider); |
30 std::unique_ptr<BeginFrameSource> external_begin_frame_source); | |
31 ~ProxyImpl() override; | 30 ~ProxyImpl() override; |
32 | 31 |
33 // Virtual for testing. | 32 // Virtual for testing. |
34 void UpdateTopControlsStateOnImpl(TopControlsState constraints, | 33 void UpdateTopControlsStateOnImpl(TopControlsState constraints, |
35 TopControlsState current, | 34 TopControlsState current, |
36 bool animate); | 35 bool animate); |
37 void InitializeCompositorFrameSinkOnImpl( | 36 void InitializeCompositorFrameSinkOnImpl( |
38 CompositorFrameSink* compositor_frame_sink); | 37 CompositorFrameSink* compositor_frame_sink); |
39 void InitializeMutatorOnImpl(std::unique_ptr<LayerTreeMutator> mutator); | 38 void InitializeMutatorOnImpl(std::unique_ptr<LayerTreeMutator> mutator); |
40 void MainThreadHasStoppedFlingingOnImpl(); | 39 void MainThreadHasStoppedFlingingOnImpl(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // thread. | 128 // thread. |
130 bool next_frame_is_newly_committed_frame_; | 129 bool next_frame_is_newly_committed_frame_; |
131 | 130 |
132 bool inside_draw_; | 131 bool inside_draw_; |
133 bool input_throttled_until_commit_; | 132 bool input_throttled_until_commit_; |
134 | 133 |
135 TaskRunnerProvider* task_runner_provider_; | 134 TaskRunnerProvider* task_runner_provider_; |
136 | 135 |
137 DelayedUniqueNotifier smoothness_priority_expiration_notifier_; | 136 DelayedUniqueNotifier smoothness_priority_expiration_notifier_; |
138 | 137 |
139 std::unique_ptr<BeginFrameSource> external_begin_frame_source_; | |
140 | |
141 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 138 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
142 | 139 |
143 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 140 std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
144 | 141 |
145 ChannelImpl* channel_impl_; | 142 ChannelImpl* channel_impl_; |
146 | 143 |
147 // Use accessors instead of this variable directly. | 144 // Use accessors instead of this variable directly. |
148 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_; | 145 BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_; |
149 BlockedMainCommitOnly& blocked_main_commit(); | 146 BlockedMainCommitOnly& blocked_main_commit(); |
150 | 147 |
151 DISALLOW_COPY_AND_ASSIGN(ProxyImpl); | 148 DISALLOW_COPY_AND_ASSIGN(ProxyImpl); |
152 }; | 149 }; |
153 | 150 |
154 } // namespace cc | 151 } // namespace cc |
155 | 152 |
156 #endif // CC_TREES_PROXY_IMPL_H_ | 153 #endif // CC_TREES_PROXY_IMPL_H_ |
OLD | NEW |