| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 } | 463 } |
| 464 | 464 |
| 465 void LayerImpl::ResetChangeTracking() { | 465 void LayerImpl::ResetChangeTracking() { |
| 466 layer_property_changed_ = false; | 466 layer_property_changed_ = false; |
| 467 needs_push_properties_ = false; | 467 needs_push_properties_ = false; |
| 468 | 468 |
| 469 update_rect_.SetRect(0, 0, 0, 0); | 469 update_rect_.SetRect(0, 0, 0, 0); |
| 470 damage_rect_.SetRect(0, 0, 0, 0); | 470 damage_rect_.SetRect(0, 0, 0, 0); |
| 471 } | 471 } |
| 472 | 472 |
| 473 int LayerImpl::num_copy_requests_in_target_subtree() { | 473 bool LayerImpl::has_copy_requests_in_target_subtree() { |
| 474 return GetEffectTree() | 474 return GetEffectTree().Node(effect_tree_index())->subtree_has_copy_request; |
| 475 .Node(effect_tree_index()) | |
| 476 ->num_copy_requests_in_subtree; | |
| 477 } | 475 } |
| 478 | 476 |
| 479 void LayerImpl::UpdatePropertyTreeForScrollingAndAnimationIfNeeded() { | 477 void LayerImpl::UpdatePropertyTreeForScrollingAndAnimationIfNeeded() { |
| 480 if (scrollable()) | 478 if (scrollable()) |
| 481 UpdatePropertyTreeScrollOffset(); | 479 UpdatePropertyTreeScrollOffset(); |
| 482 | 480 |
| 483 if (HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM)) { | 481 if (HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM)) { |
| 484 if (TransformNode* node = | 482 if (TransformNode* node = |
| 485 GetTransformTree().FindNodeFromElementId(element_id())) { | 483 GetTransformTree().FindNodeFromElementId(element_id())) { |
| 486 bool has_potential_animation = HasPotentiallyRunningTransformAnimation(); | 484 bool has_potential_animation = HasPotentiallyRunningTransformAnimation(); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 972 |
| 975 ScrollTree& LayerImpl::GetScrollTree() const { | 973 ScrollTree& LayerImpl::GetScrollTree() const { |
| 976 return GetPropertyTrees()->scroll_tree; | 974 return GetPropertyTrees()->scroll_tree; |
| 977 } | 975 } |
| 978 | 976 |
| 979 TransformTree& LayerImpl::GetTransformTree() const { | 977 TransformTree& LayerImpl::GetTransformTree() const { |
| 980 return GetPropertyTrees()->transform_tree; | 978 return GetPropertyTrees()->transform_tree; |
| 981 } | 979 } |
| 982 | 980 |
| 983 } // namespace cc | 981 } // namespace cc |
| OLD | NEW |