OLD | NEW |
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 TRACE_EVENT0("cc", "ProxyMain::Stop"); | 396 TRACE_EVENT0("cc", "ProxyMain::Stop"); |
397 DCHECK(IsMainThread()); | 397 DCHECK(IsMainThread()); |
398 DCHECK(started_); | 398 DCHECK(started_); |
399 | 399 |
400 channel_main_->SynchronouslyCloseImpl(); | 400 channel_main_->SynchronouslyCloseImpl(); |
401 | 401 |
402 layer_tree_host_ = nullptr; | 402 layer_tree_host_ = nullptr; |
403 started_ = false; | 403 started_ = false; |
404 } | 404 } |
405 | 405 |
| 406 void ProxyMain::SetMutator(LayerTreeMutator* mutator) { |
| 407 TRACE_EVENT0("compositor-worker", "ThreadProxy::SetMutator"); |
| 408 channel_main_->InitializeMutatorOnImpl(mutator); |
| 409 } |
| 410 |
406 bool ProxyMain::SupportsImplScrolling() const { | 411 bool ProxyMain::SupportsImplScrolling() const { |
407 return true; | 412 return true; |
408 } | 413 } |
409 | 414 |
410 bool ProxyMain::MainFrameWillHappenForTesting() { | 415 bool ProxyMain::MainFrameWillHappenForTesting() { |
411 DCHECK(IsMainThread()); | 416 DCHECK(IsMainThread()); |
412 bool main_frame_will_happen = false; | 417 bool main_frame_will_happen = false; |
413 { | 418 { |
414 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); | 419 DebugScopedSetMainThreadBlocked main_thread_blocked(task_runner_provider_); |
415 CompletionEvent completion; | 420 CompletionEvent completion; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 return false; | 461 return false; |
457 channel_main_->SetNeedsCommitOnImpl(); | 462 channel_main_->SetNeedsCommitOnImpl(); |
458 return true; | 463 return true; |
459 } | 464 } |
460 | 465 |
461 bool ProxyMain::IsMainThread() const { | 466 bool ProxyMain::IsMainThread() const { |
462 return task_runner_provider_->IsMainThread(); | 467 return task_runner_provider_->IsMainThread(); |
463 } | 468 } |
464 | 469 |
465 } // namespace cc | 470 } // namespace cc |
OLD | NEW |