| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.h" | 5 #include "cc/layers/layer.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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true); | 692 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true); |
| 693 } | 693 } |
| 694 | 694 |
| 695 SetNeedsCommit(); | 695 SetNeedsCommit(); |
| 696 } | 696 } |
| 697 | 697 |
| 698 bool Layer::ScrollOffsetAnimationWasInterrupted() const { | 698 bool Layer::ScrollOffsetAnimationWasInterrupted() const { |
| 699 return GetMutatorHost()->ScrollOffsetAnimationWasInterrupted(element_id()); | 699 return GetMutatorHost()->ScrollOffsetAnimationWasInterrupted(element_id()); |
| 700 } | 700 } |
| 701 | 701 |
| 702 bool Layer::HasOnlyTranslationTransforms() const { | |
| 703 return GetMutatorHost()->HasOnlyTranslationTransforms( | |
| 704 element_id(), GetElementTypeForAnimation()); | |
| 705 } | |
| 706 | |
| 707 void Layer::SetScrollParent(Layer* parent) { | 702 void Layer::SetScrollParent(Layer* parent) { |
| 708 DCHECK(IsPropertyChangeAllowed()); | 703 DCHECK(IsPropertyChangeAllowed()); |
| 709 if (inputs_.scroll_parent == parent) | 704 if (inputs_.scroll_parent == parent) |
| 710 return; | 705 return; |
| 711 | 706 |
| 712 if (inputs_.scroll_parent) | 707 if (inputs_.scroll_parent) |
| 713 inputs_.scroll_parent->RemoveScrollChild(this); | 708 inputs_.scroll_parent->RemoveScrollChild(this); |
| 714 | 709 |
| 715 inputs_.scroll_parent = parent; | 710 inputs_.scroll_parent = parent; |
| 716 | 711 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 ->subtree_has_copy_request; | 1436 ->subtree_has_copy_request; |
| 1442 } | 1437 } |
| 1443 | 1438 |
| 1444 gfx::Transform Layer::ScreenSpaceTransform() const { | 1439 gfx::Transform Layer::ScreenSpaceTransform() const { |
| 1445 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1440 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1446 return draw_property_utils::ScreenSpaceTransform( | 1441 return draw_property_utils::ScreenSpaceTransform( |
| 1447 this, layer_tree_host_->property_trees()->transform_tree); | 1442 this, layer_tree_host_->property_trees()->transform_tree); |
| 1448 } | 1443 } |
| 1449 | 1444 |
| 1450 } // namespace cc | 1445 } // namespace cc |
| OLD | NEW |