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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 layer->layer_animation_controller()->IsAnimatingProperty( | 180 layer->layer_animation_controller()->IsAnimatingProperty( |
181 Animation::TRANSFORM); | 181 Animation::TRANSFORM); |
182 | 182 |
183 const bool has_surface = !!layer->render_surface(); | 183 const bool has_surface = !!layer->render_surface(); |
184 | 184 |
185 bool requires_node = is_root || is_scrollable || has_significant_transform || | 185 bool requires_node = is_root || is_scrollable || has_significant_transform || |
186 has_potentially_animated_transform || has_surface || | 186 has_potentially_animated_transform || has_surface || |
187 is_fixed || is_page_scale_layer; | 187 is_fixed || is_page_scale_layer; |
188 | 188 |
189 LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer); | 189 LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer); |
190 DCHECK_IMPLIES(!is_root, transform_parent); | 190 DCHECK(is_root || transform_parent); |
191 | 191 |
192 int parent_index = 0; | 192 int parent_index = 0; |
193 if (transform_parent) | 193 if (transform_parent) |
194 parent_index = transform_parent->transform_tree_index(); | 194 parent_index = transform_parent->transform_tree_index(); |
195 | 195 |
196 int source_index = parent_index; | 196 int source_index = parent_index; |
197 | 197 |
198 gfx::Vector2dF source_offset; | 198 gfx::Vector2dF source_offset; |
199 if (transform_parent) { | 199 if (transform_parent) { |
200 if (layer->scroll_parent()) { | 200 if (layer->scroll_parent()) { |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 const gfx::Rect& viewport, | 496 const gfx::Rect& viewport, |
497 const gfx::Transform& device_transform, | 497 const gfx::Transform& device_transform, |
498 PropertyTrees* property_trees) { | 498 PropertyTrees* property_trees) { |
499 BuildPropertyTreesTopLevelInternal( | 499 BuildPropertyTreesTopLevelInternal( |
500 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 500 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
501 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, | 501 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, |
502 viewport, device_transform, property_trees); | 502 viewport, device_transform, property_trees); |
503 } | 503 } |
504 | 504 |
505 } // namespace cc | 505 } // namespace cc |
OLD | NEW |