| 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 DCHECK(IsImplThread()); | 405 DCHECK(IsImplThread()); |
| 406 channel_impl_->SetAnimationEvents(std::move(events)); | 406 channel_impl_->SetAnimationEvents(std::move(events)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 bool ProxyImpl::IsInsideDraw() { | 409 bool ProxyImpl::IsInsideDraw() { |
| 410 return inside_draw_; | 410 return inside_draw_; |
| 411 } | 411 } |
| 412 | 412 |
| 413 void ProxyImpl::RenewTreePriority() { | 413 void ProxyImpl::RenewTreePriority() { |
| 414 DCHECK(IsImplThread()); | 414 DCHECK(IsImplThread()); |
| 415 bool smoothness_takes_priority = | 415 bool smoothness_takes_priority = false; |
| 416 #if 0 |
| 416 layer_tree_host_impl_->pinch_gesture_active() || | 417 layer_tree_host_impl_->pinch_gesture_active() || |
| 417 layer_tree_host_impl_->page_scale_animation_active() || | 418 layer_tree_host_impl_->page_scale_animation_active() || |
| 418 layer_tree_host_impl_->IsActivelyScrolling(); | 419 layer_tree_host_impl_->IsActivelyScrolling(); |
| 420 #endif |
| 419 | 421 |
| 420 // Schedule expiration if smoothness currently takes priority. | 422 // Schedule expiration if smoothness currently takes priority. |
| 421 if (smoothness_takes_priority) | 423 if (smoothness_takes_priority) |
| 422 smoothness_priority_expiration_notifier_.Schedule(); | 424 smoothness_priority_expiration_notifier_.Schedule(); |
| 423 | 425 |
| 424 // We use the same priority for both trees by default. | 426 // We use the same priority for both trees by default. |
| 425 TreePriority tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; | 427 TreePriority tree_priority = SAME_PRIORITY_FOR_BOTH_TREES; |
| 426 | 428 |
| 427 // Smoothness takes priority if we have an expiration for it scheduled. | 429 // Smoothness takes priority if we have an expiration for it scheduled. |
| 428 if (smoothness_priority_expiration_notifier_.HasPendingNotification()) | 430 if (smoothness_priority_expiration_notifier_.HasPendingNotification()) |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 bool ProxyImpl::IsMainThreadBlocked() const { | 682 bool ProxyImpl::IsMainThreadBlocked() const { |
| 681 return task_runner_provider_->IsMainThreadBlocked(); | 683 return task_runner_provider_->IsMainThreadBlocked(); |
| 682 } | 684 } |
| 683 | 685 |
| 684 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { | 686 ProxyImpl::BlockedMainCommitOnly& ProxyImpl::blocked_main_commit() { |
| 685 DCHECK(IsMainThreadBlocked() && commit_completion_event_); | 687 DCHECK(IsMainThreadBlocked() && commit_completion_event_); |
| 686 return main_thread_blocked_commit_vars_unsafe_; | 688 return main_thread_blocked_commit_vars_unsafe_; |
| 687 } | 689 } |
| 688 | 690 |
| 689 } // namespace cc | 691 } // namespace cc |
| OLD | NEW |