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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 completion.Wait(); | 435 completion.Wait(); |
436 } | 436 } |
437 | 437 |
438 void ProxyMain::UpdateTopControlsState(TopControlsState constraints, | 438 void ProxyMain::UpdateTopControlsState(TopControlsState constraints, |
439 TopControlsState current, | 439 TopControlsState current, |
440 bool animate) { | 440 bool animate) { |
441 DCHECK(IsMainThread()); | 441 DCHECK(IsMainThread()); |
442 channel_main_->UpdateTopControlsStateOnImpl(constraints, current, animate); | 442 channel_main_->UpdateTopControlsStateOnImpl(constraints, current, animate); |
443 } | 443 } |
444 | 444 |
445 void ProxyMain::SetOutputIsSecure(bool output_is_secure) { | |
446 NOTREACHED() << "Only used by SingleProxyMain"; | |
447 } | |
448 | |
449 bool ProxyMain::SendCommitRequestToImplThreadIfNeeded( | 445 bool ProxyMain::SendCommitRequestToImplThreadIfNeeded( |
450 CommitPipelineStage required_stage) { | 446 CommitPipelineStage required_stage) { |
451 DCHECK(IsMainThread()); | 447 DCHECK(IsMainThread()); |
452 DCHECK_NE(NO_PIPELINE_STAGE, required_stage); | 448 DCHECK_NE(NO_PIPELINE_STAGE, required_stage); |
453 bool already_posted = max_requested_pipeline_stage_ != NO_PIPELINE_STAGE; | 449 bool already_posted = max_requested_pipeline_stage_ != NO_PIPELINE_STAGE; |
454 max_requested_pipeline_stage_ = | 450 max_requested_pipeline_stage_ = |
455 std::max(max_requested_pipeline_stage_, required_stage); | 451 std::max(max_requested_pipeline_stage_, required_stage); |
456 if (already_posted) | 452 if (already_posted) |
457 return false; | 453 return false; |
458 channel_main_->SetNeedsCommitOnImpl(); | 454 channel_main_->SetNeedsCommitOnImpl(); |
459 return true; | 455 return true; |
460 } | 456 } |
461 | 457 |
462 bool ProxyMain::IsMainThread() const { | 458 bool ProxyMain::IsMainThread() const { |
463 return task_runner_provider_->IsMainThread(); | 459 return task_runner_provider_->IsMainThread(); |
464 } | 460 } |
465 | 461 |
466 } // namespace cc | 462 } // namespace cc |
OLD | NEW |