| 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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 // surface. | 941 // surface. |
| 942 if (should_create_render_surface) { | 942 if (should_create_render_surface) { |
| 943 // In this case, we will create a transform node, so it's safe to use the | 943 // In this case, we will create a transform node, so it's safe to use the |
| 944 // next available id from the transform tree as this effect node's | 944 // next available id from the transform tree as this effect node's |
| 945 // transform id. | 945 // transform id. |
| 946 node->transform_id = | 946 node->transform_id = |
| 947 data_from_ancestor.property_trees->transform_tree.next_available_id(); | 947 data_from_ancestor.property_trees->transform_tree.next_available_id(); |
| 948 } | 948 } |
| 949 node->clip_id = data_from_ancestor.clip_tree_parent; | 949 node->clip_id = data_from_ancestor.clip_tree_parent; |
| 950 } else { | 950 } else { |
| 951 // Root render surface acts the unbounded and untransformed to draw content | 951 // The root render surface acts as the unbounded and untransformed |
| 952 // into. Transform node created from root layer (includes device scale | 952 // surface into which content is drawn. The transform node created |
| 953 // factor) and clip node created from root layer (include viewports) applies | 953 // from the root layer (which includes device scale factor) and |
| 954 // to root render surface's content, but not root render surface itself. | 954 // the clip node created from the root layer (which includes |
| 955 // viewports) apply to the root render surface's content, but not |
| 956 // to the root render surface itself. |
| 955 node->transform_id = TransformTree::kRootNodeId; | 957 node->transform_id = TransformTree::kRootNodeId; |
| 956 node->clip_id = ClipTree::kViewportNodeId; | 958 node->clip_id = ClipTree::kViewportNodeId; |
| 957 } | 959 } |
| 958 | 960 |
| 959 data_for_children->closest_ancestor_with_copy_request = | 961 data_for_children->closest_ancestor_with_copy_request = |
| 960 node->closest_ancestor_with_copy_request_id; | 962 node->closest_ancestor_with_copy_request_id; |
| 961 data_for_children->effect_tree_parent = node_id; | 963 data_for_children->effect_tree_parent = node_id; |
| 962 layer->SetEffectTreeIndex(node_id); | 964 layer->SetEffectTreeIndex(node_id); |
| 963 data_for_children->property_trees->effect_tree.SetOwningLayerIdForNode( | 965 data_for_children->property_trees->effect_tree.SetOwningLayerIdForNode( |
| 964 effect_tree.back(), layer->id()); | 966 effect_tree.back(), layer->id()); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1378 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 1380 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 1379 outer_viewport_scroll_layer, overscroll_elasticity_layer, | 1381 outer_viewport_scroll_layer, overscroll_elasticity_layer, |
| 1380 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, | 1382 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, |
| 1381 device_transform, property_trees, color); | 1383 device_transform, property_trees, color); |
| 1382 property_trees->effect_tree.CreateOrReuseRenderSurfaces( | 1384 property_trees->effect_tree.CreateOrReuseRenderSurfaces( |
| 1383 &render_surfaces, root_layer->layer_tree_impl()); | 1385 &render_surfaces, root_layer->layer_tree_impl()); |
| 1384 property_trees->ResetCachedData(); | 1386 property_trees->ResetCachedData(); |
| 1385 } | 1387 } |
| 1386 | 1388 |
| 1387 } // namespace cc | 1389 } // namespace cc |
| OLD | NEW |