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/trees/property_tree_builder.h" | 5 #include "cc/trees/property_tree_builder.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor, | 105 void AddTransformNodeIfNeeded(const DataForRecursion& data_from_ancestor, |
106 Layer* layer, | 106 Layer* layer, |
107 DataForRecursion* data_for_children) { | 107 DataForRecursion* data_for_children) { |
108 const bool is_root = !layer->parent(); | 108 const bool is_root = !layer->parent(); |
109 const bool is_page_scale_application_layer = | 109 const bool is_page_scale_application_layer = |
110 layer->parent() && layer->parent() == data_from_ancestor.page_scale_layer; | 110 layer->parent() && layer->parent() == data_from_ancestor.page_scale_layer; |
111 const bool is_scrollable = layer->scrollable(); | 111 const bool is_scrollable = layer->scrollable(); |
112 const bool is_fixed = layer->position_constraint().is_fixed_position(); | 112 const bool is_fixed = layer->position_constraint().is_fixed_position(); |
113 | 113 |
114 const bool has_significant_transform = | 114 const bool has_significant_transform = |
115 !layer->transform().IsIdentityOrTranslation(); | 115 !layer->transform().IsIdentityOr2DTranslation(); |
116 | 116 |
117 const bool has_animated_transform = | 117 const bool has_animated_transform = |
118 layer->layer_animation_controller()->IsAnimatingProperty( | 118 layer->layer_animation_controller()->IsAnimatingProperty( |
119 Animation::Transform); | 119 Animation::Transform); |
120 | 120 |
121 const bool has_transform_origin = layer->transform_origin() != gfx::Point3F(); | 121 const bool has_transform_origin = layer->transform_origin() != gfx::Point3F(); |
122 | 122 |
123 const bool has_surface = !!layer->render_surface(); | 123 const bool has_surface = !!layer->render_surface(); |
124 | 124 |
125 const bool flattening_change = layer->parent() && | 125 const bool flattening_change = layer->parent() && |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 data_for_recursion.clip_tree_parent = clip_tree->Insert(root_clip, 0); | 271 data_for_recursion.clip_tree_parent = clip_tree->Insert(root_clip, 0); |
272 | 272 |
273 BuildPropertyTreesInternal(root_layer, data_for_recursion); | 273 BuildPropertyTreesInternal(root_layer, data_for_recursion); |
274 | 274 |
275 TransformNode* transform_root = transform_tree->Node(transform_root_id); | 275 TransformNode* transform_root = transform_tree->Node(transform_root_id); |
276 transform_root->data.set_to_parent(device_transform * | 276 transform_root->data.set_to_parent(device_transform * |
277 transform_root->data.to_parent); | 277 transform_root->data.to_parent); |
278 } | 278 } |
279 | 279 |
280 } // namespace cc | 280 } // namespace cc |
OLD | NEW |