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

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

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "cc/trees/proxy_main.h" 5 #include "cc/trees/proxy_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 TRACE_EVENT0("cc", "ProxyMain::Stop"); 401 TRACE_EVENT0("cc", "ProxyMain::Stop");
402 DCHECK(IsMainThread()); 402 DCHECK(IsMainThread());
403 DCHECK(started_); 403 DCHECK(started_);
404 404
405 channel_main_->SynchronouslyCloseImpl(); 405 channel_main_->SynchronouslyCloseImpl();
406 406
407 layer_tree_host_ = nullptr; 407 layer_tree_host_ = nullptr;
408 started_ = false; 408 started_ = false;
409 } 409 }
410 410
411 void ProxyMain::SetMutator(std::unique_ptr<LayerTreeMutator> mutator) {
412 TRACE_EVENT0("compositor-worker", "ThreadProxy::SetMutator");
413 channel_main_->InitializeMutatorOnImpl(std::move(mutator));
414 }
415
411 bool ProxyMain::SupportsImplScrolling() const { 416 bool ProxyMain::SupportsImplScrolling() const {
412 return true; 417 return true;
413 } 418 }
414 419
415 bool ProxyMain::MainFrameWillHappenForTesting() { 420 bool ProxyMain::MainFrameWillHappenForTesting() {
416 DCHECK(IsMainThread()); 421 DCHECK(IsMainThread());
417 bool main_frame_will_happen = false; 422 bool main_frame_will_happen = false;
418 { 423 {
419 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); 424 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_);
420 CompletionEvent completion; 425 CompletionEvent completion;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 return false; 458 return false;
454 channel_main_->SetNeedsCommitOnImpl(); 459 channel_main_->SetNeedsCommitOnImpl();
455 return true; 460 return true;
456 } 461 }
457 462
458 bool ProxyMain::IsMainThread() const { 463 bool ProxyMain::IsMainThread() const {
459 return task_runner_provider_->IsMainThread(); 464 return task_runner_provider_->IsMainThread();
460 } 465 }
461 466
462 } // namespace cc 467 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/proxy_main.h ('k') | cc/trees/remote_channel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698