Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: cc/trees/remote_channel_main.cc

Issue 2320823003: cc/blimp: Remove Initialize and Close messages. (Closed)
Patch Set: format Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/remote_channel_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "cc/trees/remote_channel_main.h" 5 #include "cc/trees/remote_channel_main.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/proto/base_conversions.h" 10 #include "cc/proto/base_conversions.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 NOTREACHED() << "Should not be called on the server LayerTreeHost"; 68 NOTREACHED() << "Should not be called on the server LayerTreeHost";
69 } 69 }
70 70
71 void RemoteChannelMain::InitializeMutatorOnImpl( 71 void RemoteChannelMain::InitializeMutatorOnImpl(
72 std::unique_ptr<LayerTreeMutator> mutator) { 72 std::unique_ptr<LayerTreeMutator> mutator) {
73 // TODO(vollick): add support for CompositorWorker. 73 // TODO(vollick): add support for CompositorWorker.
74 NOTIMPLEMENTED(); 74 NOTIMPLEMENTED();
75 } 75 }
76 76
77 void RemoteChannelMain::MainThreadHasStoppedFlingingOnImpl() { 77 void RemoteChannelMain::MainThreadHasStoppedFlingingOnImpl() {
78 proto::CompositorMessage proto; 78 NOTIMPLEMENTED();
79 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl();
80 to_impl_proto->set_message_type(
81 proto::CompositorMessageToImpl::MAIN_THREAD_HAS_STOPPED_FLINGING_ON_IMPL);
82
83 SendMessageProto(proto);
84 } 79 }
85 80
86 void RemoteChannelMain::SetInputThrottledUntilCommitOnImpl(bool is_throttled) {} 81 void RemoteChannelMain::SetInputThrottledUntilCommitOnImpl(bool is_throttled) {}
87 82
88 void RemoteChannelMain::SetDeferCommitsOnImpl(bool defer_commits) { 83 void RemoteChannelMain::SetDeferCommitsOnImpl(bool defer_commits) {
89 TRACE_EVENT1("cc.remote", "RemoteChannelMain::SetDeferCommitsOnImpl", 84 TRACE_EVENT1("cc.remote", "RemoteChannelMain::SetDeferCommitsOnImpl",
90 "defer_commits", defer_commits); 85 "defer_commits", defer_commits);
91 proto::CompositorMessage proto; 86 proto::CompositorMessage proto;
92 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl(); 87 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl();
93 to_impl_proto->set_message_type( 88 to_impl_proto->set_message_type(
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 217
223 completion->Signal(); 218 completion->Signal();
224 } 219 }
225 220
226 void RemoteChannelMain::SynchronouslyInitializeImpl( 221 void RemoteChannelMain::SynchronouslyInitializeImpl(
227 LayerTreeHost* layer_tree_host, 222 LayerTreeHost* layer_tree_host,
228 std::unique_ptr<BeginFrameSource> external_begin_frame_source) { 223 std::unique_ptr<BeginFrameSource> external_begin_frame_source) {
229 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SynchronouslyInitializeImpl"); 224 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SynchronouslyInitializeImpl");
230 DCHECK(!initialized_); 225 DCHECK(!initialized_);
231 226
232 proto::CompositorMessage proto;
233 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl();
234 to_impl_proto->set_message_type(
235 proto::CompositorMessageToImpl::INITIALIZE_IMPL);
236
237 VLOG(1) << "Sending initialize message to client";
238 SendMessageProto(proto);
239 initialized_ = true; 227 initialized_ = true;
240 } 228 }
241 229
242 void RemoteChannelMain::SynchronouslyCloseImpl() { 230 void RemoteChannelMain::SynchronouslyCloseImpl() {
243 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SynchronouslyCloseImpl"); 231 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SynchronouslyCloseImpl");
244 DCHECK(initialized_); 232 DCHECK(initialized_);
245 proto::CompositorMessage proto;
246 proto::CompositorMessageToImpl* to_impl_proto = proto.mutable_to_impl();
247 to_impl_proto->set_message_type(proto::CompositorMessageToImpl::CLOSE_IMPL);
248 233
249 VLOG(1) << "Sending close message to client.";
250 SendMessageProto(proto);
251 initialized_ = false; 234 initialized_ = false;
252 } 235 }
253 236
254 void RemoteChannelMain::SendMessageProto( 237 void RemoteChannelMain::SendMessageProto(
255 const proto::CompositorMessage& proto) { 238 const proto::CompositorMessage& proto) {
256 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SendMessageProto"); 239 TRACE_EVENT0("cc.remote", "RemoteChannelMain::SendMessageProto");
257 remote_proto_channel_->SendCompositorProto(proto); 240 remote_proto_channel_->SendCompositorProto(proto);
258 } 241 }
259 242
260 void RemoteChannelMain::HandleProto( 243 void RemoteChannelMain::HandleProto(
(...skipping 26 matching lines...) Expand all
287 270
288 void RemoteChannelMain::DidCompleteSwapBuffers() { 271 void RemoteChannelMain::DidCompleteSwapBuffers() {
289 proxy_main_->DidCompleteSwapBuffers(); 272 proxy_main_->DidCompleteSwapBuffers();
290 } 273 }
291 274
292 base::SingleThreadTaskRunner* RemoteChannelMain::MainThreadTaskRunner() const { 275 base::SingleThreadTaskRunner* RemoteChannelMain::MainThreadTaskRunner() const {
293 return task_runner_provider_->MainThreadTaskRunner(); 276 return task_runner_provider_->MainThreadTaskRunner();
294 } 277 }
295 278
296 } // namespace cc 279 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/remote_channel_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698