| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_utils.h" | 5 #include "cc/layers/layer_utils.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer_impl.h" | 7 #include "cc/layers/layer_impl.h" |
| 8 #include "cc/trees/layer_tree_host_common.h" | 8 #include "cc/trees/layer_tree_host_common.h" |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 #include "cc/trees/transform_node.h" | 10 #include "cc/trees/transform_node.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const TransformNode* transform_node = | 80 const TransformNode* transform_node = |
| 81 transform_tree.Node(layer_in.transform_tree_index()); | 81 transform_tree.Node(layer_in.transform_tree_index()); |
| 82 | 82 |
| 83 // If layer_in has a transform node, the offset_to_transform_parent() is 0 | 83 // If layer_in has a transform node, the offset_to_transform_parent() is 0 |
| 84 coalesced_transform.Translate(layer_in.offset_to_transform_parent().x(), | 84 coalesced_transform.Translate(layer_in.offset_to_transform_parent().x(), |
| 85 layer_in.offset_to_transform_parent().y()); | 85 layer_in.offset_to_transform_parent().y()); |
| 86 | 86 |
| 87 for (; transform_tree.parent(transform_node); | 87 for (; transform_tree.parent(transform_node); |
| 88 transform_node = transform_tree.parent(transform_node)) { | 88 transform_node = transform_tree.parent(transform_node)) { |
| 89 LayerImpl* layer = | 89 LayerImpl* layer = |
| 90 layer_in.layer_tree_impl()->LayerById(transform_node->owner_id); | 90 layer_in.layer_tree_impl()->LayerById(transform_node->owning_layer_id); |
| 91 | 91 |
| 92 // Filter animation bounds are unimplemented, see function | 92 // Filter animation bounds are unimplemented, see function |
| 93 // HasAncestorFilterAnimation() for reference. | 93 // HasAncestorFilterAnimation() for reference. |
| 94 | 94 |
| 95 if (HasTransformAnimationThatInflatesBounds(*layer)) { | 95 if (HasTransformAnimationThatInflatesBounds(*layer)) { |
| 96 coalesced_transform.ConcatTransform(transform_node->pre_local); | 96 coalesced_transform.ConcatTransform(transform_node->pre_local); |
| 97 coalesced_transform.TransformBox(&box); | 97 coalesced_transform.TransformBox(&box); |
| 98 coalesced_transform.MakeIdentity(); | 98 coalesced_transform.MakeIdentity(); |
| 99 | 99 |
| 100 gfx::BoxF inflated; | 100 gfx::BoxF inflated; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 112 // be applied. | 112 // be applied. |
| 113 if (!coalesced_transform.IsIdentity()) | 113 if (!coalesced_transform.IsIdentity()) |
| 114 coalesced_transform.TransformBox(&box); | 114 coalesced_transform.TransformBox(&box); |
| 115 | 115 |
| 116 *out = box; | 116 *out = box; |
| 117 | 117 |
| 118 return true; | 118 return true; |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace cc | 121 } // namespace cc |
| OLD | NEW |