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_TREES_REMOTE_CHANNEL_IMPL_H_ | 5 #ifndef CC_TREES_REMOTE_CHANNEL_IMPL_H_ |
6 #define CC_TREES_REMOTE_CHANNEL_IMPL_H_ | 6 #define CC_TREES_REMOTE_CHANNEL_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 public: | 80 public: |
81 RemoteChannelImpl(LayerTreeHostInProcess* layer_tree_host, | 81 RemoteChannelImpl(LayerTreeHostInProcess* layer_tree_host, |
82 RemoteProtoChannel* remote_proto_channel, | 82 RemoteProtoChannel* remote_proto_channel, |
83 TaskRunnerProvider* task_runner_provider); | 83 TaskRunnerProvider* task_runner_provider); |
84 ~RemoteChannelImpl() override; | 84 ~RemoteChannelImpl() override; |
85 | 85 |
86 // virtual for testing. | 86 // virtual for testing. |
87 virtual std::unique_ptr<ProxyImpl> CreateProxyImpl( | 87 virtual std::unique_ptr<ProxyImpl> CreateProxyImpl( |
88 ChannelImpl* channel_impl, | 88 ChannelImpl* channel_impl, |
89 LayerTreeHostInProcess* layer_tree_host, | 89 LayerTreeHostInProcess* layer_tree_host, |
90 TaskRunnerProvider* task_runner_provider, | 90 TaskRunnerProvider* task_runner_provider); |
91 std::unique_ptr<BeginFrameSource> external_begin_frame_source); | |
92 | 91 |
93 private: | 92 private: |
94 struct MainThreadOnly { | 93 struct MainThreadOnly { |
95 LayerTreeHostInProcess* layer_tree_host; | 94 LayerTreeHostInProcess* layer_tree_host; |
96 RemoteProtoChannel* remote_proto_channel; | 95 RemoteProtoChannel* remote_proto_channel; |
97 | 96 |
98 bool started; | 97 bool started; |
99 | 98 |
100 // This is set to true if we lost the output surface and can not push any | 99 // This is set to true if we lost the output surface and can not push any |
101 // commits to the impl thread. | 100 // commits to the impl thread. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 void SetNeedsAnimate() override; | 137 void SetNeedsAnimate() override; |
139 void SetNeedsUpdateLayers() override; | 138 void SetNeedsUpdateLayers() override; |
140 void SetNeedsCommit() override; | 139 void SetNeedsCommit() override; |
141 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; | 140 void SetNeedsRedraw(const gfx::Rect& damage_rect) override; |
142 void SetNextCommitWaitsForActivation() override; | 141 void SetNextCommitWaitsForActivation() override; |
143 void NotifyInputThrottledUntilCommit() override; | 142 void NotifyInputThrottledUntilCommit() override; |
144 void SetDeferCommits(bool defer_commits) override; | 143 void SetDeferCommits(bool defer_commits) override; |
145 void MainThreadHasStoppedFlinging() override; | 144 void MainThreadHasStoppedFlinging() override; |
146 bool CommitRequested() const override; | 145 bool CommitRequested() const override; |
147 bool BeginMainFrameRequested() const override; | 146 bool BeginMainFrameRequested() const override; |
148 void Start( | 147 void Start() override; |
149 std::unique_ptr<BeginFrameSource> external_begin_frame_source) override; | |
150 void Stop() override; | 148 void Stop() override; |
151 void SetMutator(std::unique_ptr<LayerTreeMutator> mutator) override; | 149 void SetMutator(std::unique_ptr<LayerTreeMutator> mutator) override; |
152 bool SupportsImplScrolling() const override; | 150 bool SupportsImplScrolling() const override; |
153 void UpdateTopControlsState(TopControlsState constraints, | 151 void UpdateTopControlsState(TopControlsState constraints, |
154 TopControlsState current, | 152 TopControlsState current, |
155 bool animate) override; | 153 bool animate) override; |
156 bool MainFrameWillHappenForTesting() override; | 154 bool MainFrameWillHappenForTesting() override; |
157 | 155 |
158 // Called on impl thread. | 156 // Called on impl thread. |
159 // ChannelImpl implementation | 157 // ChannelImpl implementation |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 CompositorThreadOnly compositor_thread_vars_unsafe_; | 197 CompositorThreadOnly compositor_thread_vars_unsafe_; |
200 | 198 |
201 base::WeakPtr<ProxyImpl> proxy_impl_weak_ptr_; | 199 base::WeakPtr<ProxyImpl> proxy_impl_weak_ptr_; |
202 | 200 |
203 DISALLOW_COPY_AND_ASSIGN(RemoteChannelImpl); | 201 DISALLOW_COPY_AND_ASSIGN(RemoteChannelImpl); |
204 }; | 202 }; |
205 | 203 |
206 } // namespace cc | 204 } // namespace cc |
207 | 205 |
208 #endif // CC_TREES_REMOTE_CHANNEL_IMPL_H_ | 206 #endif // CC_TREES_REMOTE_CHANNEL_IMPL_H_ |
OLD | NEW |