| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 const bool has_any_transform_animation = | 229 const bool has_any_transform_animation = |
| 230 layer->HasAnyAnimationTargetingProperty(Animation::TRANSFORM); | 230 layer->HasAnyAnimationTargetingProperty(Animation::TRANSFORM); |
| 231 | 231 |
| 232 const bool has_surface = layer->has_render_surface(); | 232 const bool has_surface = layer->has_render_surface(); |
| 233 | 233 |
| 234 bool requires_node = is_root || is_scrollable || has_significant_transform || | 234 bool requires_node = is_root || is_scrollable || has_significant_transform || |
| 235 has_any_transform_animation || has_surface || is_fixed || | 235 has_any_transform_animation || has_surface || is_fixed || |
| 236 is_page_scale_layer; | 236 is_page_scale_layer; |
| 237 | 237 |
| 238 LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer); | 238 LayerType* transform_parent = GetTransformParent(data_from_ancestor, layer); |
| 239 DCHECK_IMPLIES(!is_root, transform_parent); | 239 DCHECK(is_root || transform_parent); |
| 240 | 240 |
| 241 int parent_index = kRootPropertyTreeNodeId; | 241 int parent_index = kRootPropertyTreeNodeId; |
| 242 if (transform_parent) | 242 if (transform_parent) |
| 243 parent_index = transform_parent->transform_tree_index(); | 243 parent_index = transform_parent->transform_tree_index(); |
| 244 | 244 |
| 245 int source_index = parent_index; | 245 int source_index = parent_index; |
| 246 | 246 |
| 247 gfx::Vector2dF source_offset; | 247 gfx::Vector2dF source_offset; |
| 248 if (transform_parent) { | 248 if (transform_parent) { |
| 249 if (layer->scroll_parent()) { | 249 if (layer->scroll_parent()) { |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 const gfx::Rect& viewport, | 612 const gfx::Rect& viewport, |
| 613 const gfx::Transform& device_transform, | 613 const gfx::Transform& device_transform, |
| 614 PropertyTrees* property_trees) { | 614 PropertyTrees* property_trees) { |
| 615 BuildPropertyTreesTopLevelInternal( | 615 BuildPropertyTreesTopLevelInternal( |
| 616 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 616 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 617 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, | 617 outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, |
| 618 viewport, device_transform, property_trees); | 618 viewport, device_transform, property_trees); |
| 619 } | 619 } |
| 620 | 620 |
| 621 } // namespace cc | 621 } // namespace cc |
| OLD | NEW |