| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 | 660 |
| 661 mutable_properties_ = properties; | 661 mutable_properties_ = properties; |
| 662 // If this layer is already in the element map, update its properties. | 662 // If this layer is already in the element map, update its properties. |
| 663 layer_tree_impl_->AddToElementMap(this); | 663 layer_tree_impl_->AddToElementMap(this); |
| 664 } | 664 } |
| 665 | 665 |
| 666 void LayerImpl::SetPosition(const gfx::PointF& position) { | 666 void LayerImpl::SetPosition(const gfx::PointF& position) { |
| 667 position_ = position; | 667 position_ = position; |
| 668 } | 668 } |
| 669 | 669 |
| 670 bool LayerImpl::TransformIsAnimating() const { | |
| 671 return GetMutatorHost()->IsAnimatingTransformProperty( | |
| 672 element_id(), GetElementTypeForAnimation()); | |
| 673 } | |
| 674 | |
| 675 bool LayerImpl::HasPotentiallyRunningTransformAnimation() const { | 670 bool LayerImpl::HasPotentiallyRunningTransformAnimation() const { |
| 676 return GetMutatorHost()->HasPotentiallyRunningTransformAnimation( | 671 return GetMutatorHost()->HasPotentiallyRunningTransformAnimation( |
| 677 element_id(), GetElementTypeForAnimation()); | 672 element_id(), GetElementTypeForAnimation()); |
| 678 } | 673 } |
| 679 | 674 |
| 680 bool LayerImpl::HasAnyAnimationTargetingProperty( | 675 bool LayerImpl::HasAnyAnimationTargetingProperty( |
| 681 TargetProperty::Type property) const { | 676 TargetProperty::Type property) const { |
| 682 return GetMutatorHost()->HasAnyAnimationTargetingProperty(element_id(), | 677 return GetMutatorHost()->HasAnyAnimationTargetingProperty(element_id(), |
| 683 property); | 678 property); |
| 684 } | 679 } |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 973 |
| 979 ScrollTree& LayerImpl::GetScrollTree() const { | 974 ScrollTree& LayerImpl::GetScrollTree() const { |
| 980 return GetPropertyTrees()->scroll_tree; | 975 return GetPropertyTrees()->scroll_tree; |
| 981 } | 976 } |
| 982 | 977 |
| 983 TransformTree& LayerImpl::GetTransformTree() const { | 978 TransformTree& LayerImpl::GetTransformTree() const { |
| 984 return GetPropertyTrees()->transform_tree; | 979 return GetPropertyTrees()->transform_tree; |
| 985 } | 980 } |
| 986 | 981 |
| 987 } // namespace cc | 982 } // namespace cc |
| OLD | NEW |