| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // for the parent in the Layer tree). | 389 // for the parent in the Layer tree). |
| 390 source_index = Parent(layer)->transform_tree_index(); | 390 source_index = Parent(layer)->transform_tree_index(); |
| 391 source_offset = Parent(layer)->offset_to_transform_parent(); | 391 source_offset = Parent(layer)->offset_to_transform_parent(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 if (IsContainerForFixedPositionLayers(layer) || is_root) { | 394 if (IsContainerForFixedPositionLayers(layer) || is_root) { |
| 395 data_for_children->affected_by_inner_viewport_bounds_delta = | 395 data_for_children->affected_by_inner_viewport_bounds_delta = |
| 396 layer == data_from_ancestor.inner_viewport_scroll_layer; | 396 layer == data_from_ancestor.inner_viewport_scroll_layer; |
| 397 data_for_children->affected_by_outer_viewport_bounds_delta = | 397 data_for_children->affected_by_outer_viewport_bounds_delta = |
| 398 layer == data_from_ancestor.outer_viewport_scroll_layer; | 398 layer == data_from_ancestor.outer_viewport_scroll_layer; |
| 399 if (is_scrollable) { | 399 data_for_children->transform_fixed_parent = layer; |
| 400 DCHECK(!is_root); | |
| 401 DCHECK(Transform(layer).IsIdentity()); | |
| 402 data_for_children->transform_fixed_parent = Parent(layer); | |
| 403 } else { | |
| 404 data_for_children->transform_fixed_parent = layer; | |
| 405 } | |
| 406 } | 400 } |
| 407 data_for_children->transform_tree_parent = layer; | 401 data_for_children->transform_tree_parent = layer; |
| 408 | 402 |
| 409 if (!requires_node) { | 403 if (!requires_node) { |
| 410 data_for_children->should_flatten |= ShouldFlattenTransform(layer); | 404 data_for_children->should_flatten |= ShouldFlattenTransform(layer); |
| 411 gfx::Vector2dF local_offset = layer->position().OffsetFromOrigin() + | 405 gfx::Vector2dF local_offset = layer->position().OffsetFromOrigin() + |
| 412 Transform(layer).To2dTranslation(); | 406 Transform(layer).To2dTranslation(); |
| 413 gfx::Vector2dF source_to_parent; | 407 gfx::Vector2dF source_to_parent; |
| 414 if (source_index != parent_index) { | 408 if (source_index != parent_index) { |
| 415 gfx::Transform to_parent; | 409 gfx::Transform to_parent; |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 1375 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 1382 outer_viewport_scroll_layer, overscroll_elasticity_layer, | 1376 outer_viewport_scroll_layer, overscroll_elasticity_layer, |
| 1383 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, | 1377 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, |
| 1384 device_transform, property_trees, color); | 1378 device_transform, property_trees, color); |
| 1385 property_trees->effect_tree.CreateOrReuseRenderSurfaces( | 1379 property_trees->effect_tree.CreateOrReuseRenderSurfaces( |
| 1386 &render_surfaces, root_layer->layer_tree_impl()); | 1380 &render_surfaces, root_layer->layer_tree_impl()); |
| 1387 property_trees->ResetCachedData(); | 1381 property_trees->ResetCachedData(); |
| 1388 } | 1382 } |
| 1389 | 1383 |
| 1390 } // namespace cc | 1384 } // namespace cc |
| OLD | NEW |