| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // The RemoteChannelImpl receives and processes messages from the remote server | 71 // The RemoteChannelImpl receives and processes messages from the remote server |
| 72 // compositor on the main thread. The requests from ProxyImpl are received on | 72 // compositor on the main thread. The requests from ProxyImpl are received on |
| 73 // the impl thread which may be directed to the LayerTreeHost on the client | 73 // the impl thread which may be directed to the LayerTreeHost on the client |
| 74 // (for instance output surface requests) or sent to the LayerTreeHost on the | 74 // (for instance output surface requests) or sent to the LayerTreeHost on the |
| 75 // server. The messages to the server are created on the impl thread and sent | 75 // server. The messages to the server are created on the impl thread and sent |
| 76 // using the RemoteProtoChannel on the main thread. | 76 // using the RemoteProtoChannel on the main thread. |
| 77 class CC_EXPORT RemoteChannelImpl : public ChannelImpl, | 77 class CC_EXPORT RemoteChannelImpl : public ChannelImpl, |
| 78 public RemoteProtoChannel::ProtoReceiver, | 78 public RemoteProtoChannel::ProtoReceiver, |
| 79 public Proxy { | 79 public Proxy { |
| 80 public: | 80 public: |
| 81 static std::unique_ptr<RemoteChannelImpl> Create( | |
| 82 LayerTreeHost* layer_tree_host, | |
| 83 RemoteProtoChannel* remote_proto_channel, | |
| 84 TaskRunnerProvider* task_runner_provider); | |
| 85 | |
| 86 ~RemoteChannelImpl() override; | |
| 87 | |
| 88 protected: | |
| 89 RemoteChannelImpl(LayerTreeHost* layer_tree_host, | 81 RemoteChannelImpl(LayerTreeHost* layer_tree_host, |
| 90 RemoteProtoChannel* remote_proto_channel, | 82 RemoteProtoChannel* remote_proto_channel, |
| 91 TaskRunnerProvider* task_runner_provider); | 83 TaskRunnerProvider* task_runner_provider); |
| 84 ~RemoteChannelImpl() override; |
| 92 | 85 |
| 93 // virtual for testing. | 86 // virtual for testing. |
| 94 virtual std::unique_ptr<ProxyImpl> CreateProxyImpl( | 87 virtual std::unique_ptr<ProxyImpl> CreateProxyImpl( |
| 95 ChannelImpl* channel_impl, | 88 ChannelImpl* channel_impl, |
| 96 LayerTreeHost* layer_tree_host, | 89 LayerTreeHost* layer_tree_host, |
| 97 TaskRunnerProvider* task_runner_provider, | 90 TaskRunnerProvider* task_runner_provider, |
| 98 std::unique_ptr<BeginFrameSource> external_begin_frame_source); | 91 std::unique_ptr<BeginFrameSource> external_begin_frame_source); |
| 99 | 92 |
| 100 private: | 93 private: |
| 101 struct MainThreadOnly { | 94 struct MainThreadOnly { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 CompositorThreadOnly compositor_thread_vars_unsafe_; | 208 CompositorThreadOnly compositor_thread_vars_unsafe_; |
| 216 | 209 |
| 217 base::WeakPtr<ProxyImpl> proxy_impl_weak_ptr_; | 210 base::WeakPtr<ProxyImpl> proxy_impl_weak_ptr_; |
| 218 | 211 |
| 219 DISALLOW_COPY_AND_ASSIGN(RemoteChannelImpl); | 212 DISALLOW_COPY_AND_ASSIGN(RemoteChannelImpl); |
| 220 }; | 213 }; |
| 221 | 214 |
| 222 } // namespace cc | 215 } // namespace cc |
| 223 | 216 |
| 224 #endif // CC_TREES_REMOTE_CHANNEL_IMPL_H_ | 217 #endif // CC_TREES_REMOTE_CHANNEL_IMPL_H_ |
| OLD | NEW |