| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const LayerType* inner_viewport_scroll_layer; | 43 const LayerType* inner_viewport_scroll_layer; |
| 44 const LayerType* outer_viewport_scroll_layer; | 44 const LayerType* outer_viewport_scroll_layer; |
| 45 const LayerType* overscroll_elasticity_layer; | 45 const LayerType* overscroll_elasticity_layer; |
| 46 gfx::Vector2dF elastic_overscroll; | 46 gfx::Vector2dF elastic_overscroll; |
| 47 float page_scale_factor; | 47 float page_scale_factor; |
| 48 bool in_subtree_of_page_scale_layer; | 48 bool in_subtree_of_page_scale_layer; |
| 49 bool affected_by_inner_viewport_bounds_delta; | 49 bool affected_by_inner_viewport_bounds_delta; |
| 50 bool affected_by_outer_viewport_bounds_delta; | 50 bool affected_by_outer_viewport_bounds_delta; |
| 51 bool should_flatten; | 51 bool should_flatten; |
| 52 bool is_hidden; | 52 bool is_hidden; |
| 53 bool apply_ancestor_clip; | |
| 54 uint32_t main_thread_scrolling_reasons; | 53 uint32_t main_thread_scrolling_reasons; |
| 55 bool scroll_tree_parent_created_by_uninheritable_criteria; | 54 bool scroll_tree_parent_created_by_uninheritable_criteria; |
| 56 const gfx::Transform* device_transform; | 55 const gfx::Transform* device_transform; |
| 57 gfx::Transform compound_transform_since_render_target; | 56 gfx::Transform compound_transform_since_render_target; |
| 58 bool axis_align_since_render_target; | 57 bool axis_align_since_render_target; |
| 59 SkColor safe_opaque_background_color; | 58 SkColor safe_opaque_background_color; |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 template <typename LayerType> | 61 template <typename LayerType> |
| 63 struct DataForRecursionFromChild { | 62 struct DataForRecursionFromChild { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 | 79 |
| 81 static LayerStickyPositionConstraint StickyPositionConstraint(Layer* layer) { | 80 static LayerStickyPositionConstraint StickyPositionConstraint(Layer* layer) { |
| 82 return layer->sticky_position_constraint(); | 81 return layer->sticky_position_constraint(); |
| 83 } | 82 } |
| 84 | 83 |
| 85 static LayerStickyPositionConstraint StickyPositionConstraint( | 84 static LayerStickyPositionConstraint StickyPositionConstraint( |
| 86 LayerImpl* layer) { | 85 LayerImpl* layer) { |
| 87 return layer->test_properties()->sticky_position_constraint; | 86 return layer->test_properties()->sticky_position_constraint; |
| 88 } | 87 } |
| 89 | 88 |
| 90 struct PreCalculateMetaInformationRecursiveData { | |
| 91 size_t num_unclipped_descendants; | |
| 92 int num_descendants_that_draw_content; | |
| 93 | |
| 94 PreCalculateMetaInformationRecursiveData() | |
| 95 : num_unclipped_descendants(0), | |
| 96 num_descendants_that_draw_content(0) {} | |
| 97 | |
| 98 void Merge(const PreCalculateMetaInformationRecursiveData& data) { | |
| 99 num_unclipped_descendants += data.num_unclipped_descendants; | |
| 100 num_descendants_that_draw_content += data.num_descendants_that_draw_content; | |
| 101 } | |
| 102 }; | |
| 103 | |
| 104 static inline bool IsRootLayer(const Layer* layer) { | |
| 105 return !layer->parent(); | |
| 106 } | |
| 107 | |
| 108 static bool IsMetaInformationRecomputationNeeded(Layer* layer) { | |
| 109 return layer->layer_tree_host()->needs_meta_info_recomputation(); | |
| 110 } | |
| 111 | |
| 112 // Recursively walks the layer tree(if needed) to compute any information | |
| 113 // that is needed before doing the main recursion. | |
| 114 static void PreCalculateMetaInformationInternal( | |
| 115 Layer* layer, | |
| 116 PreCalculateMetaInformationRecursiveData* recursive_data) { | |
| 117 if (!IsMetaInformationRecomputationNeeded(layer)) { | |
| 118 DCHECK(IsRootLayer(layer)); | |
| 119 return; | |
| 120 } | |
| 121 | |
| 122 if (layer->clip_parent()) | |
| 123 recursive_data->num_unclipped_descendants++; | |
| 124 | |
| 125 for (size_t i = 0; i < layer->children().size(); ++i) { | |
| 126 Layer* child_layer = layer->child_at(i); | |
| 127 | |
| 128 PreCalculateMetaInformationRecursiveData data_for_child; | |
| 129 PreCalculateMetaInformationInternal(child_layer, &data_for_child); | |
| 130 recursive_data->Merge(data_for_child); | |
| 131 } | |
| 132 | |
| 133 if (layer->clip_children()) { | |
| 134 size_t num_clip_children = layer->clip_children()->size(); | |
| 135 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children); | |
| 136 recursive_data->num_unclipped_descendants -= num_clip_children; | |
| 137 } | |
| 138 | |
| 139 layer->set_num_unclipped_descendants( | |
| 140 recursive_data->num_unclipped_descendants); | |
| 141 | |
| 142 if (IsRootLayer(layer)) | |
| 143 layer->layer_tree_host()->SetNeedsMetaInfoRecomputation(false); | |
| 144 } | |
| 145 | |
| 146 static void PreCalculateMetaInformationInternalForTesting( | |
| 147 LayerImpl* layer, | |
| 148 PreCalculateMetaInformationRecursiveData* recursive_data) { | |
| 149 if (layer->test_properties()->clip_parent) | |
| 150 recursive_data->num_unclipped_descendants++; | |
| 151 | |
| 152 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { | |
| 153 LayerImpl* child_layer = layer->test_properties()->children[i]; | |
| 154 | |
| 155 PreCalculateMetaInformationRecursiveData data_for_child; | |
| 156 PreCalculateMetaInformationInternalForTesting(child_layer, &data_for_child); | |
| 157 recursive_data->Merge(data_for_child); | |
| 158 } | |
| 159 | |
| 160 if (layer->test_properties()->clip_children) { | |
| 161 size_t num_clip_children = layer->test_properties()->clip_children->size(); | |
| 162 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children); | |
| 163 recursive_data->num_unclipped_descendants -= num_clip_children; | |
| 164 } | |
| 165 | |
| 166 layer->test_properties()->num_unclipped_descendants = | |
| 167 recursive_data->num_unclipped_descendants; | |
| 168 // TODO(enne): this should be synced from the main thread, so is only | |
| 169 // for tests constructing layers on the compositor thread. | |
| 170 layer->test_properties()->num_descendants_that_draw_content = | |
| 171 recursive_data->num_descendants_that_draw_content; | |
| 172 | |
| 173 if (layer->DrawsContent()) | |
| 174 recursive_data->num_descendants_that_draw_content++; | |
| 175 } | |
| 176 | |
| 177 static LayerImplList& Children(LayerImpl* layer) { | 89 static LayerImplList& Children(LayerImpl* layer) { |
| 178 return layer->test_properties()->children; | 90 return layer->test_properties()->children; |
| 179 } | 91 } |
| 180 | 92 |
| 181 static const LayerList& Children(Layer* layer) { | 93 static const LayerList& Children(Layer* layer) { |
| 182 return layer->children(); | 94 return layer->children(); |
| 183 } | 95 } |
| 184 | 96 |
| 185 static LayerImpl* ChildAt(LayerImpl* layer, int index) { | 97 static LayerImpl* ChildAt(LayerImpl* layer, int index) { |
| 186 return layer->test_properties()->children[index]; | 98 return layer->test_properties()->children[index]; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 207 } | 119 } |
| 208 | 120 |
| 209 static Layer* ClipParent(Layer* layer) { | 121 static Layer* ClipParent(Layer* layer) { |
| 210 return layer->clip_parent(); | 122 return layer->clip_parent(); |
| 211 } | 123 } |
| 212 | 124 |
| 213 static LayerImpl* ClipParent(LayerImpl* layer) { | 125 static LayerImpl* ClipParent(LayerImpl* layer) { |
| 214 return layer->test_properties()->clip_parent; | 126 return layer->test_properties()->clip_parent; |
| 215 } | 127 } |
| 216 | 128 |
| 217 static size_t NumUnclippedDescendants(Layer* layer) { | |
| 218 return layer->num_unclipped_descendants(); | |
| 219 } | |
| 220 | |
| 221 static size_t NumUnclippedDescendants(LayerImpl* layer) { | |
| 222 return layer->test_properties()->num_unclipped_descendants; | |
| 223 } | |
| 224 | |
| 225 static inline const FilterOperations& Filters(Layer* layer) { | 129 static inline const FilterOperations& Filters(Layer* layer) { |
| 226 return layer->filters(); | 130 return layer->filters(); |
| 227 } | 131 } |
| 228 | 132 |
| 229 static inline const FilterOperations& Filters(LayerImpl* layer) { | 133 static inline const FilterOperations& Filters(LayerImpl* layer) { |
| 230 return layer->test_properties()->filters; | 134 return layer->test_properties()->filters; |
| 231 } | 135 } |
| 232 | 136 |
| 233 static Layer* MaskLayer(Layer* layer) { | 137 static Layer* MaskLayer(Layer* layer) { |
| 234 return layer->mask_layer(); | 138 return layer->mask_layer(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } | 237 } |
| 334 | 238 |
| 335 static Layer* Parent(Layer* layer) { | 239 static Layer* Parent(Layer* layer) { |
| 336 return layer->parent(); | 240 return layer->parent(); |
| 337 } | 241 } |
| 338 | 242 |
| 339 static LayerImpl* Parent(LayerImpl* layer) { | 243 static LayerImpl* Parent(LayerImpl* layer) { |
| 340 return layer->test_properties()->parent; | 244 return layer->test_properties()->parent; |
| 341 } | 245 } |
| 342 | 246 |
| 343 template <typename LayerType> | |
| 344 static void SetSurfaceIsClipped(DataForRecursion<LayerType>* data_for_children, | |
| 345 bool apply_ancestor_clip, | |
| 346 LayerType* layer) { | |
| 347 // A surface with unclipped descendants cannot be clipped by its ancestor | |
| 348 // clip at draw time since the unclipped descendants aren't affected by the | |
| 349 // ancestor clip. | |
| 350 EffectNode* effect_node = data_for_children->property_trees->effect_tree.Node( | |
| 351 data_for_children->render_target); | |
| 352 DCHECK_EQ(effect_node->owning_layer_id, layer->id()); | |
| 353 effect_node->surface_is_clipped = | |
| 354 apply_ancestor_clip && !NumUnclippedDescendants(layer); | |
| 355 // The ancestor clip should propagate to children only if the surface doesn't | |
| 356 // apply the clip. | |
| 357 data_for_children->apply_ancestor_clip = | |
| 358 apply_ancestor_clip && !effect_node->surface_is_clipped; | |
| 359 } | |
| 360 | |
| 361 static inline int SortingContextId(Layer* layer) { | 247 static inline int SortingContextId(Layer* layer) { |
| 362 return layer->sorting_context_id(); | 248 return layer->sorting_context_id(); |
| 363 } | 249 } |
| 364 | 250 |
| 365 static inline int SortingContextId(LayerImpl* layer) { | 251 static inline int SortingContextId(LayerImpl* layer) { |
| 366 return layer->test_properties()->sorting_context_id; | 252 return layer->test_properties()->sorting_context_id; |
| 367 } | 253 } |
| 368 | 254 |
| 369 static inline bool Is3dSorted(Layer* layer) { | 255 static inline bool Is3dSorted(Layer* layer) { |
| 370 return layer->Is3dSorted(); | 256 return layer->Is3dSorted(); |
| 371 } | 257 } |
| 372 | 258 |
| 373 static inline bool Is3dSorted(LayerImpl* layer) { | 259 static inline bool Is3dSorted(LayerImpl* layer) { |
| 374 return layer->test_properties()->sorting_context_id != 0; | 260 return layer->test_properties()->sorting_context_id != 0; |
| 375 } | 261 } |
| 376 | 262 |
| 377 template <typename LayerType> | 263 template <typename LayerType> |
| 378 void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor, | 264 void AddClipNodeIfNeeded(const DataForRecursion<LayerType>& data_from_ancestor, |
| 379 LayerType* layer, | 265 LayerType* layer, |
| 380 bool created_render_surface, | 266 bool created_render_surface, |
| 381 bool created_transform_node, | 267 bool created_transform_node, |
| 382 DataForRecursion<LayerType>* data_for_children) { | 268 DataForRecursion<LayerType>* data_for_children) { |
| 383 const bool inherits_clip = !ClipParent(layer); | 269 const bool inherits_clip = !ClipParent(layer); |
| 384 const int parent_id = inherits_clip ? data_from_ancestor.clip_tree_parent | 270 const int parent_id = inherits_clip ? data_from_ancestor.clip_tree_parent |
| 385 : ClipParent(layer)->clip_tree_index(); | 271 : ClipParent(layer)->clip_tree_index(); |
| 386 ClipNode* parent = | |
| 387 data_from_ancestor.property_trees->clip_tree.Node(parent_id); | |
| 388 | |
| 389 bool apply_ancestor_clip = false; | |
| 390 if (inherits_clip) { | |
| 391 apply_ancestor_clip = data_from_ancestor.apply_ancestor_clip; | |
| 392 } else { | |
| 393 const EffectNode* parent_effect_node = | |
| 394 data_from_ancestor.property_trees->effect_tree.Node( | |
| 395 ClipParent(layer)->effect_tree_index()); | |
| 396 if (parent_effect_node->clip_id == parent->id) { | |
| 397 if (parent_effect_node->surface_is_clipped) { | |
| 398 // In this case, there is no clipping layer between the clip parent and | |
| 399 // its target and the target has applied the clip. | |
| 400 apply_ancestor_clip = false; | |
| 401 } else { | |
| 402 // In this case, there is no clipping layer between the clip parent and | |
| 403 // its target and the target has not applied the clip. There are two | |
| 404 // cases when a target doesn't apply clip. First, there is no ancestor | |
| 405 // clip to apply, in this case apply_ancestor_clip should be false. | |
| 406 // Second, there is a clip to apply but there are unclipped descendants, | |
| 407 // so the target cannot apply the clip. In this case, | |
| 408 // apply_ancestor_clip should be true. | |
| 409 apply_ancestor_clip = parent_effect_node->has_unclipped_descendants; | |
| 410 } | |
| 411 } else { | |
| 412 // In this case, there is a clipping layer between the clip parent and | |
| 413 // its target. | |
| 414 apply_ancestor_clip = true; | |
| 415 } | |
| 416 } | |
| 417 if (created_render_surface) | |
| 418 SetSurfaceIsClipped(data_for_children, apply_ancestor_clip, layer); | |
| 419 | 272 |
| 420 bool layer_clips_subtree = LayerClipsSubtree(layer); | 273 bool layer_clips_subtree = LayerClipsSubtree(layer); |
| 421 if (layer_clips_subtree) { | |
| 422 data_for_children->apply_ancestor_clip = true; | |
| 423 } | |
| 424 | |
| 425 bool requires_node = | 274 bool requires_node = |
| 426 layer_clips_subtree || Filters(layer).HasFilterThatMovesPixels(); | 275 layer_clips_subtree || Filters(layer).HasFilterThatMovesPixels(); |
| 427 if (!requires_node) { | 276 if (!requires_node) { |
| 428 data_for_children->clip_tree_parent = parent_id; | 277 data_for_children->clip_tree_parent = parent_id; |
| 429 } else { | 278 } else { |
| 430 LayerType* transform_parent = data_for_children->transform_tree_parent; | 279 LayerType* transform_parent = data_for_children->transform_tree_parent; |
| 431 if (PositionConstraint(layer).is_fixed_position() && | 280 if (PositionConstraint(layer).is_fixed_position() && |
| 432 !created_transform_node) { | 281 !created_transform_node) { |
| 433 transform_parent = data_for_children->transform_fixed_parent; | 282 transform_parent = data_for_children->transform_fixed_parent; |
| 434 } | 283 } |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 } | 650 } |
| 802 | 651 |
| 803 static inline bool IsRootForIsolatedGroup(LayerImpl* layer) { | 652 static inline bool IsRootForIsolatedGroup(LayerImpl* layer) { |
| 804 return false; | 653 return false; |
| 805 } | 654 } |
| 806 | 655 |
| 807 static inline int NumDescendantsThatDrawContent(Layer* layer) { | 656 static inline int NumDescendantsThatDrawContent(Layer* layer) { |
| 808 return layer->NumDescendantsThatDrawContent(); | 657 return layer->NumDescendantsThatDrawContent(); |
| 809 } | 658 } |
| 810 | 659 |
| 660 static inline int NumLayerOrDescendantsThatDrawContentRecursive( |
| 661 LayerImpl* layer) { |
| 662 int num = layer->DrawsContent() ? 1 : 0; |
| 663 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { |
| 664 LayerImpl* child_layer = layer->test_properties()->children[i]; |
| 665 num += NumLayerOrDescendantsThatDrawContentRecursive(child_layer); |
| 666 } |
| 667 return num; |
| 668 } |
| 669 |
| 811 static inline int NumDescendantsThatDrawContent(LayerImpl* layer) { | 670 static inline int NumDescendantsThatDrawContent(LayerImpl* layer) { |
| 812 return layer->test_properties()->num_descendants_that_draw_content; | 671 int num_descendants_that_draw_content = 0; |
| 672 for (size_t i = 0; i < layer->test_properties()->children.size(); ++i) { |
| 673 LayerImpl* child_layer = layer->test_properties()->children[i]; |
| 674 num_descendants_that_draw_content += |
| 675 NumLayerOrDescendantsThatDrawContentRecursive(child_layer); |
| 676 } |
| 677 return num_descendants_that_draw_content; |
| 813 } | 678 } |
| 814 | 679 |
| 815 static inline float EffectiveOpacity(Layer* layer) { | 680 static inline float EffectiveOpacity(Layer* layer) { |
| 816 return layer->EffectiveOpacity(); | 681 return layer->EffectiveOpacity(); |
| 817 } | 682 } |
| 818 | 683 |
| 819 static inline float EffectiveOpacity(LayerImpl* layer) { | 684 static inline float EffectiveOpacity(LayerImpl* layer) { |
| 820 return layer->test_properties()->hide_layer_and_subtree | 685 return layer->test_properties()->hide_layer_and_subtree |
| 821 ? 0.f | 686 ? 0.f |
| 822 : layer->test_properties()->opacity; | 687 : layer->test_properties()->opacity; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 if (!is_root) { | 932 if (!is_root) { |
| 1068 // The effect node's transform id is used only when we create a render | 933 // The effect node's transform id is used only when we create a render |
| 1069 // surface. So, we can leave the default value when we don't create a render | 934 // surface. So, we can leave the default value when we don't create a render |
| 1070 // surface. | 935 // surface. |
| 1071 if (should_create_render_surface) { | 936 if (should_create_render_surface) { |
| 1072 // In this case, we will create a transform node, so it's safe to use the | 937 // In this case, we will create a transform node, so it's safe to use the |
| 1073 // next available id from the transform tree as this effect node's | 938 // next available id from the transform tree as this effect node's |
| 1074 // transform id. | 939 // transform id. |
| 1075 node.transform_id = | 940 node.transform_id = |
| 1076 data_from_ancestor.property_trees->transform_tree.next_available_id(); | 941 data_from_ancestor.property_trees->transform_tree.next_available_id(); |
| 1077 node.has_unclipped_descendants = (NumUnclippedDescendants(layer) != 0); | |
| 1078 } | 942 } |
| 1079 node.clip_id = data_from_ancestor.clip_tree_parent; | 943 node.clip_id = data_from_ancestor.clip_tree_parent; |
| 1080 } else { | 944 } else { |
| 1081 // Root render surface acts the unbounded and untransformed to draw content | 945 // Root render surface acts the unbounded and untransformed to draw content |
| 1082 // into. Transform node created from root layer (includes device scale | 946 // into. Transform node created from root layer (includes device scale |
| 1083 // factor) and clip node created from root layer (include viewports) applies | 947 // factor) and clip node created from root layer (include viewports) applies |
| 1084 // to root render surface's content, but not root render surface itself. | 948 // to root render surface's content, but not root render surface itself. |
| 1085 node.transform_id = TransformTree::kRootNodeId; | 949 node.transform_id = TransformTree::kRootNodeId; |
| 1086 node.clip_id = ClipTree::kViewportNodeId; | 950 node.clip_id = ClipTree::kViewportNodeId; |
| 1087 } | 951 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 if (effect_node->owning_layer_id == layer->id()) { | 1203 if (effect_node->owning_layer_id == layer->id()) { |
| 1340 if (effect_node->has_copy_request) | 1204 if (effect_node->has_copy_request) |
| 1341 data_to_parent->num_copy_requests_in_subtree++; | 1205 data_to_parent->num_copy_requests_in_subtree++; |
| 1342 effect_node->num_copy_requests_in_subtree = | 1206 effect_node->num_copy_requests_in_subtree = |
| 1343 data_to_parent->num_copy_requests_in_subtree; | 1207 data_to_parent->num_copy_requests_in_subtree; |
| 1344 } | 1208 } |
| 1345 } | 1209 } |
| 1346 | 1210 |
| 1347 } // namespace | 1211 } // namespace |
| 1348 | 1212 |
| 1349 void CC_EXPORT | |
| 1350 PropertyTreeBuilder::PreCalculateMetaInformation(Layer* root_layer) { | |
| 1351 PreCalculateMetaInformationRecursiveData recursive_data; | |
| 1352 PreCalculateMetaInformationInternal(root_layer, &recursive_data); | |
| 1353 } | |
| 1354 | |
| 1355 void CC_EXPORT PropertyTreeBuilder::PreCalculateMetaInformationForTesting( | |
| 1356 LayerImpl* root_layer) { | |
| 1357 PreCalculateMetaInformationRecursiveData recursive_data; | |
| 1358 PreCalculateMetaInformationInternalForTesting(root_layer, &recursive_data); | |
| 1359 } | |
| 1360 | |
| 1361 Layer* PropertyTreeBuilder::FindFirstScrollableLayer(Layer* layer) { | 1213 Layer* PropertyTreeBuilder::FindFirstScrollableLayer(Layer* layer) { |
| 1362 if (!layer) | 1214 if (!layer) |
| 1363 return nullptr; | 1215 return nullptr; |
| 1364 | 1216 |
| 1365 if (layer->scrollable()) | 1217 if (layer->scrollable()) |
| 1366 return layer; | 1218 return layer; |
| 1367 | 1219 |
| 1368 for (size_t i = 0; i < layer->children().size(); ++i) { | 1220 for (size_t i = 0; i < layer->children().size(); ++i) { |
| 1369 Layer* found = FindFirstScrollableLayer(layer->children()[i].get()); | 1221 Layer* found = FindFirstScrollableLayer(layer->children()[i].get()); |
| 1370 if (found) | 1222 if (found) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 data_for_recursion.inner_viewport_scroll_layer = inner_viewport_scroll_layer; | 1267 data_for_recursion.inner_viewport_scroll_layer = inner_viewport_scroll_layer; |
| 1416 data_for_recursion.outer_viewport_scroll_layer = outer_viewport_scroll_layer; | 1268 data_for_recursion.outer_viewport_scroll_layer = outer_viewport_scroll_layer; |
| 1417 data_for_recursion.overscroll_elasticity_layer = overscroll_elasticity_layer; | 1269 data_for_recursion.overscroll_elasticity_layer = overscroll_elasticity_layer; |
| 1418 data_for_recursion.elastic_overscroll = elastic_overscroll; | 1270 data_for_recursion.elastic_overscroll = elastic_overscroll; |
| 1419 data_for_recursion.page_scale_factor = page_scale_factor; | 1271 data_for_recursion.page_scale_factor = page_scale_factor; |
| 1420 data_for_recursion.in_subtree_of_page_scale_layer = false; | 1272 data_for_recursion.in_subtree_of_page_scale_layer = false; |
| 1421 data_for_recursion.affected_by_inner_viewport_bounds_delta = false; | 1273 data_for_recursion.affected_by_inner_viewport_bounds_delta = false; |
| 1422 data_for_recursion.affected_by_outer_viewport_bounds_delta = false; | 1274 data_for_recursion.affected_by_outer_viewport_bounds_delta = false; |
| 1423 data_for_recursion.should_flatten = false; | 1275 data_for_recursion.should_flatten = false; |
| 1424 data_for_recursion.is_hidden = false; | 1276 data_for_recursion.is_hidden = false; |
| 1425 // The root clip is always applied. | |
| 1426 data_for_recursion.apply_ancestor_clip = true; | |
| 1427 data_for_recursion.main_thread_scrolling_reasons = | 1277 data_for_recursion.main_thread_scrolling_reasons = |
| 1428 MainThreadScrollingReason::kNotScrollingOnMain; | 1278 MainThreadScrollingReason::kNotScrollingOnMain; |
| 1429 data_for_recursion.scroll_tree_parent_created_by_uninheritable_criteria = | 1279 data_for_recursion.scroll_tree_parent_created_by_uninheritable_criteria = |
| 1430 true; | 1280 true; |
| 1431 data_for_recursion.device_transform = &device_transform; | 1281 data_for_recursion.device_transform = &device_transform; |
| 1432 | 1282 |
| 1433 data_for_recursion.property_trees->clear(); | 1283 data_for_recursion.property_trees->clear(); |
| 1434 data_for_recursion.compound_transform_since_render_target = gfx::Transform(); | 1284 data_for_recursion.compound_transform_since_render_target = gfx::Transform(); |
| 1435 data_for_recursion.axis_align_since_render_target = true; | 1285 data_for_recursion.axis_align_since_render_target = true; |
| 1436 data_for_recursion.property_trees->transform_tree.set_device_scale_factor( | 1286 data_for_recursion.property_trees->transform_tree.set_device_scale_factor( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 1382 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 1533 outer_viewport_scroll_layer, overscroll_elasticity_layer, | 1383 outer_viewport_scroll_layer, overscroll_elasticity_layer, |
| 1534 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, | 1384 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, |
| 1535 device_transform, property_trees, color); | 1385 device_transform, property_trees, color); |
| 1536 property_trees->effect_tree.CreateOrReuseRenderSurfaces( | 1386 property_trees->effect_tree.CreateOrReuseRenderSurfaces( |
| 1537 &render_surfaces, root_layer->layer_tree_impl()); | 1387 &render_surfaces, root_layer->layer_tree_impl()); |
| 1538 property_trees->ResetCachedData(); | 1388 property_trees->ResetCachedData(); |
| 1539 } | 1389 } |
| 1540 | 1390 |
| 1541 } // namespace cc | 1391 } // namespace cc |
| OLD | NEW |