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

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

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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/single_thread_proxy.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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 TRACE_EVENT0("cc", "ProxyMain::Stop"); 393 TRACE_EVENT0("cc", "ProxyMain::Stop");
394 DCHECK(IsMainThread()); 394 DCHECK(IsMainThread());
395 DCHECK(started_); 395 DCHECK(started_);
396 396
397 channel_main_->SynchronouslyCloseImpl(); 397 channel_main_->SynchronouslyCloseImpl();
398 398
399 layer_tree_host_ = nullptr; 399 layer_tree_host_ = nullptr;
400 started_ = false; 400 started_ = false;
401 } 401 }
402 402
403 void ProxyMain::SetMutator(LayerTreeMutator* mutator) {
404 TRACE_EVENT0("compositor-worker", "ThreadProxy::SetMutator");
405 channel_main_->InitializeMutatorOnImpl(mutator);
406 }
407
403 bool ProxyMain::SupportsImplScrolling() const { 408 bool ProxyMain::SupportsImplScrolling() const {
404 return true; 409 return true;
405 } 410 }
406 411
407 bool ProxyMain::MainFrameWillHappenForTesting() { 412 bool ProxyMain::MainFrameWillHappenForTesting() {
408 DCHECK(IsMainThread()); 413 DCHECK(IsMainThread());
409 bool main_frame_will_happen = false; 414 bool main_frame_will_happen = false;
410 { 415 {
411 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); 416 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_);
412 CompletionEvent completion; 417 CompletionEvent completion;
(...skipping 40 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/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698