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_impl.h" | 5 #include "cc/trees/proxy_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 // Only put the scheduler in impl latency prioritization mode if we don't | 405 // Only put the scheduler in impl latency prioritization mode if we don't |
406 // have a scroll listener. This gives the scroll listener a better chance of | 406 // have a scroll listener. This gives the scroll listener a better chance of |
407 // handling scroll updates within the same frame. The tree itself is still | 407 // handling scroll updates within the same frame. The tree itself is still |
408 // kept in prefer smoothness mode to allow checkerboarding. | 408 // kept in prefer smoothness mode to allow checkerboarding. |
409 ScrollHandlerState scroll_handler_state = | 409 ScrollHandlerState scroll_handler_state = |
410 layer_tree_host_impl_->scroll_affects_scroll_handler() | 410 layer_tree_host_impl_->scroll_affects_scroll_handler() |
411 ? ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER | 411 ? ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER |
412 : ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; | 412 : ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER; |
413 scheduler_->SetTreePrioritiesAndScrollState(tree_priority, | 413 scheduler_->SetTreePrioritiesAndScrollState(tree_priority, |
414 scroll_handler_state); | 414 scroll_handler_state); |
415 | |
416 // Notify the the client of this compositor via the output surface. | |
417 // TODO(epenner): Route this to compositor-thread instead of output-surface | |
418 // after GTFO refactor of compositor-thread (http://crbug/170828). | |
419 if (layer_tree_host_impl_->output_surface()) { | |
420 layer_tree_host_impl_->output_surface()->UpdateSmoothnessTakesPriority( | |
421 tree_priority == SMOOTHNESS_TAKES_PRIORITY); | |
422 } | |
423 } | 415 } |
424 | 416 |
425 void ProxyImpl::PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 417 void ProxyImpl::PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
426 base::TimeDelta delay) { | 418 base::TimeDelta delay) { |
427 DCHECK(IsImplThread()); | 419 DCHECK(IsImplThread()); |
428 task_runner_provider_->ImplThreadTaskRunner()->PostDelayedTask(FROM_HERE, | 420 task_runner_provider_->ImplThreadTaskRunner()->PostDelayedTask(FROM_HERE, |
429 task, delay); | 421 task, delay); |
430 } | 422 } |
431 | 423 |
432 void ProxyImpl::DidActivateSyncTree() { | 424 void ProxyImpl::DidActivateSyncTree() { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 bool ProxyImpl::IsMainThreadBlocked() const { | 665 bool ProxyImpl::IsMainThreadBlocked() const { |
674 return task_runner_provider_->IsMainThreadBlocked(); | 666 return task_runner_provider_->IsMainThreadBlocked(); |
675 } | 667 } |
676 | 668 |
677 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 669 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
678 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 670 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
679 return main_thread_blocked_commit_vars_unsafe_; | 671 return main_thread_blocked_commit_vars_unsafe_; |
680 } | 672 } |
681 | 673 |
682 } // namespace cc | 674 } // namespace cc |
OLD | NEW |