Chromium Code Reviews| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 bool should_flatten; | 51 bool should_flatten; |
| 52 bool is_hidden; | 52 bool is_hidden; |
| 53 uint32_t main_thread_scrolling_reasons; | 53 uint32_t main_thread_scrolling_reasons; |
| 54 bool scroll_tree_parent_created_by_uninheritable_criteria; | 54 bool scroll_tree_parent_created_by_uninheritable_criteria; |
| 55 const gfx::Transform* device_transform; | 55 const gfx::Transform* device_transform; |
| 56 gfx::Transform compound_transform_since_render_target; | 56 gfx::Transform compound_transform_since_render_target; |
| 57 bool axis_align_since_render_target; | 57 bool axis_align_since_render_target; |
| 58 SkColor safe_opaque_background_color; | 58 SkColor safe_opaque_background_color; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 template <typename LayerType> | |
| 62 struct DataForRecursionFromChild { | |
| 63 int num_copy_requests_in_subtree; | |
| 64 | |
| 65 DataForRecursionFromChild() : num_copy_requests_in_subtree(0) {} | |
| 66 | |
| 67 void Merge(const DataForRecursionFromChild& data) { | |
| 68 num_copy_requests_in_subtree += data.num_copy_requests_in_subtree; | |
| 69 } | |
| 70 }; | |
| 71 | |
| 72 static LayerPositionConstraint PositionConstraint(Layer* layer) { | 61 static LayerPositionConstraint PositionConstraint(Layer* layer) { |
| 73 return layer->position_constraint(); | 62 return layer->position_constraint(); |
| 74 } | 63 } |
| 75 | 64 |
| 76 static LayerPositionConstraint PositionConstraint(LayerImpl* layer) { | 65 static LayerPositionConstraint PositionConstraint(LayerImpl* layer) { |
| 77 return layer->test_properties()->position_constraint; | 66 return layer->test_properties()->position_constraint; |
| 78 } | 67 } |
| 79 | 68 |
| 80 static LayerStickyPositionConstraint StickyPositionConstraint(Layer* layer) { | 69 static LayerStickyPositionConstraint StickyPositionConstraint(Layer* layer) { |
| 81 return layer->sticky_position_constraint(); | 70 return layer->sticky_position_constraint(); |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 851 } | 840 } |
| 852 | 841 |
| 853 static void TakeCopyRequests( | 842 static void TakeCopyRequests( |
| 854 LayerImpl* layer, | 843 LayerImpl* layer, |
| 855 std::vector<std::unique_ptr<CopyOutputRequest>>* copy_requests) { | 844 std::vector<std::unique_ptr<CopyOutputRequest>>* copy_requests) { |
| 856 for (auto& request : layer->test_properties()->copy_requests) | 845 for (auto& request : layer->test_properties()->copy_requests) |
| 857 copy_requests->push_back(std::move(request)); | 846 copy_requests->push_back(std::move(request)); |
| 858 layer->test_properties()->copy_requests.clear(); | 847 layer->test_properties()->copy_requests.clear(); |
| 859 } | 848 } |
| 860 | 849 |
| 850 static void SetSubtreeHasCopyRequest(Layer* layer, | |
| 851 bool subtree_has_copy_request) { | |
| 852 layer->SetSubtreeHasCopyRequest(subtree_has_copy_request); | |
| 853 } | |
| 854 | |
| 855 static void SetSubtreeHasCopyRequest(LayerImpl* layer, | |
| 856 bool subtree_has_copy_request) { | |
| 857 layer->test_properties()->subtree_has_copy_request = subtree_has_copy_request; | |
| 858 } | |
| 859 | |
| 860 static bool SubtreeHasCopyRequest(Layer* layer) { | |
| 861 return layer->SubtreeHasCopyRequest(); | |
| 862 } | |
| 863 | |
| 864 static bool SubtreeHasCopyRequest(LayerImpl* layer) { | |
| 865 return layer->test_properties()->subtree_has_copy_request; | |
| 866 } | |
| 867 | |
| 868 template <typename LayerType> | |
| 869 bool UpdateSubtreeHasCopyRequestRecursive(LayerType* layer) { | |
| 870 bool subtree_has_copy_request = false; | |
| 871 if (HasCopyRequest(layer)) | |
| 872 subtree_has_copy_request = true; | |
| 873 for (size_t i = 0; i < Children(layer).size(); ++i) { | |
| 874 LayerType* current_child = ChildAt(layer, i); | |
| 875 subtree_has_copy_request |= | |
| 876 UpdateSubtreeHasCopyRequestRecursive(current_child); | |
| 877 } | |
| 878 SetSubtreeHasCopyRequest(layer, subtree_has_copy_request); | |
| 879 return subtree_has_copy_request; | |
| 880 } | |
| 881 | |
| 861 template <typename LayerType> | 882 template <typename LayerType> |
| 862 bool AddEffectNodeIfNeeded( | 883 bool AddEffectNodeIfNeeded( |
| 863 const DataForRecursion<LayerType>& data_from_ancestor, | 884 const DataForRecursion<LayerType>& data_from_ancestor, |
| 864 LayerType* layer, | 885 LayerType* layer, |
| 865 DataForRecursion<LayerType>* data_for_children) { | 886 DataForRecursion<LayerType>* data_for_children) { |
| 866 const bool is_root = !Parent(layer); | 887 const bool is_root = !Parent(layer); |
| 867 const bool has_transparency = EffectiveOpacity(layer) != 1.f; | 888 const bool has_transparency = EffectiveOpacity(layer) != 1.f; |
| 868 const bool has_potential_opacity_animation = | 889 const bool has_potential_opacity_animation = |
| 869 HasPotentialOpacityAnimation(layer); | 890 HasPotentialOpacityAnimation(layer); |
| 870 const bool has_potential_filter_animation = | 891 const bool has_potential_filter_animation = |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 906 node.filters = Filters(layer); | 927 node.filters = Filters(layer); |
| 907 node.background_filters = BackgroundFilters(layer); | 928 node.background_filters = BackgroundFilters(layer); |
| 908 node.filters_origin = FiltersOrigin(layer); | 929 node.filters_origin = FiltersOrigin(layer); |
| 909 node.has_potential_opacity_animation = has_potential_opacity_animation; | 930 node.has_potential_opacity_animation = has_potential_opacity_animation; |
| 910 node.has_potential_filter_animation = has_potential_filter_animation; | 931 node.has_potential_filter_animation = has_potential_filter_animation; |
| 911 node.double_sided = DoubleSided(layer); | 932 node.double_sided = DoubleSided(layer); |
| 912 node.subtree_hidden = HideLayerAndSubtree(layer); | 933 node.subtree_hidden = HideLayerAndSubtree(layer); |
| 913 node.is_currently_animating_opacity = OpacityIsAnimating(layer); | 934 node.is_currently_animating_opacity = OpacityIsAnimating(layer); |
| 914 node.is_currently_animating_filter = FilterIsAnimating(layer); | 935 node.is_currently_animating_filter = FilterIsAnimating(layer); |
| 915 node.effect_changed = PropertyChanged(layer); | 936 node.effect_changed = PropertyChanged(layer); |
| 937 node.subtree_has_copy_request = SubtreeHasCopyRequest(layer); | |
| 916 | 938 |
| 917 EffectTree& effect_tree = data_for_children->property_trees->effect_tree; | 939 EffectTree& effect_tree = data_for_children->property_trees->effect_tree; |
| 918 if (MaskLayer(layer)) { | 940 if (MaskLayer(layer)) { |
| 919 node.mask_layer_id = MaskLayer(layer)->id(); | 941 node.mask_layer_id = MaskLayer(layer)->id(); |
| 920 effect_tree.AddMaskLayerId(node.mask_layer_id); | 942 effect_tree.AddMaskLayerId(node.mask_layer_id); |
| 921 } | 943 } |
| 922 | 944 |
| 923 if (!is_root) { | 945 if (!is_root) { |
| 924 // The effect node's transform id is used only when we create a render | 946 // The effect node's transform id is used only when we create a render |
| 925 // surface. So, we can leave the default value when we don't create a render | 947 // surface. So, we can leave the default value when we don't create a render |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1113 if (parent->subtree_property_changed()) | 1135 if (parent->subtree_property_changed()) |
| 1114 child->SetSubtreePropertyChanged(); | 1136 child->SetSubtreePropertyChanged(); |
| 1115 } | 1137 } |
| 1116 | 1138 |
| 1117 static void SetLayerPropertyChangedForChild(LayerImpl* parent, | 1139 static void SetLayerPropertyChangedForChild(LayerImpl* parent, |
| 1118 LayerImpl* child) {} | 1140 LayerImpl* child) {} |
| 1119 | 1141 |
| 1120 template <typename LayerType> | 1142 template <typename LayerType> |
| 1121 void BuildPropertyTreesInternal( | 1143 void BuildPropertyTreesInternal( |
| 1122 LayerType* layer, | 1144 LayerType* layer, |
| 1123 const DataForRecursion<LayerType>& data_from_parent, | 1145 const DataForRecursion<LayerType>& data_from_parent) { |
| 1124 DataForRecursionFromChild<LayerType>* data_to_parent) { | |
| 1125 layer->set_property_tree_sequence_number( | 1146 layer->set_property_tree_sequence_number( |
| 1126 data_from_parent.property_trees->sequence_number); | 1147 data_from_parent.property_trees->sequence_number); |
| 1127 | 1148 |
| 1128 DataForRecursion<LayerType> data_for_children(data_from_parent); | 1149 DataForRecursion<LayerType> data_for_children(data_from_parent); |
| 1129 | 1150 |
| 1130 bool created_render_surface = | 1151 bool created_render_surface = |
| 1131 AddEffectNodeIfNeeded(data_from_parent, layer, &data_for_children); | 1152 AddEffectNodeIfNeeded(data_from_parent, layer, &data_for_children); |
| 1132 | 1153 |
| 1133 if (created_render_surface) | 1154 if (created_render_surface) |
| 1134 data_for_children.render_target = data_for_children.effect_tree_parent; | 1155 data_for_children.render_target = data_for_children.effect_tree_parent; |
| 1135 | 1156 |
| 1136 bool created_transform_node = AddTransformNodeIfNeeded( | 1157 bool created_transform_node = AddTransformNodeIfNeeded( |
| 1137 data_from_parent, layer, created_render_surface, &data_for_children); | 1158 data_from_parent, layer, created_render_surface, &data_for_children); |
| 1138 AddClipNodeIfNeeded(data_from_parent, layer, created_transform_node, | 1159 AddClipNodeIfNeeded(data_from_parent, layer, created_transform_node, |
| 1139 &data_for_children); | 1160 &data_for_children); |
| 1140 | 1161 |
| 1141 AddScrollNodeIfNeeded(data_from_parent, layer, &data_for_children); | 1162 AddScrollNodeIfNeeded(data_from_parent, layer, &data_for_children); |
| 1142 | 1163 |
| 1143 SetBackfaceVisibilityTransform(layer, created_transform_node); | 1164 SetBackfaceVisibilityTransform(layer, created_transform_node); |
| 1144 SetSafeOpaqueBackgroundColor(data_from_parent, layer, &data_for_children); | 1165 SetSafeOpaqueBackgroundColor(data_from_parent, layer, &data_for_children); |
| 1145 | 1166 |
| 1146 for (size_t i = 0; i < Children(layer).size(); ++i) { | 1167 for (size_t i = 0; i < Children(layer).size(); ++i) { |
| 1147 LayerType* current_child = ChildAt(layer, i); | 1168 LayerType* current_child = ChildAt(layer, i); |
| 1148 SetLayerPropertyChangedForChild(layer, current_child); | 1169 SetLayerPropertyChangedForChild(layer, current_child); |
| 1149 if (!ScrollParent(current_child)) { | 1170 if (!ScrollParent(current_child)) { |
| 1150 DataForRecursionFromChild<LayerType> data_from_child; | 1171 BuildPropertyTreesInternal(current_child, data_for_children); |
| 1151 BuildPropertyTreesInternal(current_child, data_for_children, | |
| 1152 &data_from_child); | |
| 1153 data_to_parent->Merge(data_from_child); | |
| 1154 } else { | 1172 } else { |
| 1155 // The child should be included in its scroll parent's list of scroll | 1173 // The child should be included in its scroll parent's list of scroll |
| 1156 // children. | 1174 // children. |
| 1157 DCHECK(ScrollChildren(ScrollParent(current_child))->count(current_child)); | 1175 DCHECK(ScrollChildren(ScrollParent(current_child))->count(current_child)); |
| 1158 } | 1176 } |
| 1159 } | 1177 } |
| 1160 | 1178 |
| 1161 if (ScrollChildren(layer)) { | 1179 if (ScrollChildren(layer)) { |
| 1162 for (LayerType* scroll_child : *ScrollChildren(layer)) { | 1180 for (LayerType* scroll_child : *ScrollChildren(layer)) { |
| 1163 DCHECK_EQ(ScrollParent(scroll_child), layer); | 1181 DCHECK_EQ(ScrollParent(scroll_child), layer); |
| 1164 DataForRecursionFromChild<LayerType> data_from_child; | |
| 1165 DCHECK(Parent(scroll_child)); | 1182 DCHECK(Parent(scroll_child)); |
| 1166 data_for_children.effect_tree_parent = | 1183 data_for_children.effect_tree_parent = |
| 1167 Parent(scroll_child)->effect_tree_index(); | 1184 Parent(scroll_child)->effect_tree_index(); |
| 1168 data_for_children.render_target = | 1185 data_for_children.render_target = |
| 1169 Parent(scroll_child)->effect_tree_index(); | 1186 Parent(scroll_child)->effect_tree_index(); |
| 1170 BuildPropertyTreesInternal(scroll_child, data_for_children, | 1187 BuildPropertyTreesInternal(scroll_child, data_for_children); |
| 1171 &data_from_child); | |
| 1172 data_to_parent->Merge(data_from_child); | |
| 1173 } | 1188 } |
| 1174 } | 1189 } |
| 1175 | 1190 |
| 1176 if (MaskLayer(layer)) { | 1191 if (MaskLayer(layer)) { |
| 1177 MaskLayer(layer)->set_property_tree_sequence_number( | 1192 MaskLayer(layer)->set_property_tree_sequence_number( |
| 1178 data_from_parent.property_trees->sequence_number); | 1193 data_from_parent.property_trees->sequence_number); |
| 1179 MaskLayer(layer)->set_offset_to_transform_parent( | 1194 MaskLayer(layer)->set_offset_to_transform_parent( |
| 1180 layer->offset_to_transform_parent()); | 1195 layer->offset_to_transform_parent()); |
| 1181 MaskLayer(layer)->SetTransformTreeIndex(layer->transform_tree_index()); | 1196 MaskLayer(layer)->SetTransformTreeIndex(layer->transform_tree_index()); |
| 1182 MaskLayer(layer)->SetClipTreeIndex(layer->clip_tree_index()); | 1197 MaskLayer(layer)->SetClipTreeIndex(layer->clip_tree_index()); |
| 1183 MaskLayer(layer)->SetEffectTreeIndex(layer->effect_tree_index()); | 1198 MaskLayer(layer)->SetEffectTreeIndex(layer->effect_tree_index()); |
| 1184 MaskLayer(layer)->SetScrollTreeIndex(layer->scroll_tree_index()); | 1199 MaskLayer(layer)->SetScrollTreeIndex(layer->scroll_tree_index()); |
| 1185 } | 1200 } |
| 1186 | |
| 1187 EffectNode* effect_node = data_for_children.property_trees->effect_tree.Node( | |
| 1188 data_for_children.effect_tree_parent); | |
| 1189 | |
| 1190 if (effect_node->owning_layer_id == layer->id()) { | |
| 1191 if (effect_node->has_copy_request) | |
| 1192 data_to_parent->num_copy_requests_in_subtree++; | |
| 1193 effect_node->num_copy_requests_in_subtree = | |
| 1194 data_to_parent->num_copy_requests_in_subtree; | |
| 1195 } | |
| 1196 } | 1201 } |
| 1197 | 1202 |
| 1198 } // namespace | 1203 } // namespace |
| 1199 | 1204 |
| 1200 Layer* PropertyTreeBuilder::FindFirstScrollableLayer(Layer* layer) { | 1205 Layer* PropertyTreeBuilder::FindFirstScrollableLayer(Layer* layer) { |
| 1201 if (!layer) | 1206 if (!layer) |
| 1202 return nullptr; | 1207 return nullptr; |
| 1203 | 1208 |
| 1204 if (layer->scrollable()) | 1209 if (layer->scrollable()) |
| 1205 return layer; | 1210 return layer; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1275 data_for_recursion.safe_opaque_background_color = color; | 1280 data_for_recursion.safe_opaque_background_color = color; |
| 1276 | 1281 |
| 1277 ClipNode root_clip; | 1282 ClipNode root_clip; |
| 1278 root_clip.clip_type = ClipNode::ClipType::APPLIES_LOCAL_CLIP; | 1283 root_clip.clip_type = ClipNode::ClipType::APPLIES_LOCAL_CLIP; |
| 1279 root_clip.clip = gfx::RectF(viewport); | 1284 root_clip.clip = gfx::RectF(viewport); |
| 1280 root_clip.transform_id = TransformTree::kRootNodeId; | 1285 root_clip.transform_id = TransformTree::kRootNodeId; |
| 1281 data_for_recursion.clip_tree_parent = | 1286 data_for_recursion.clip_tree_parent = |
| 1282 data_for_recursion.property_trees->clip_tree.Insert( | 1287 data_for_recursion.property_trees->clip_tree.Insert( |
| 1283 root_clip, ClipTree::kRootNodeId); | 1288 root_clip, ClipTree::kRootNodeId); |
| 1284 | 1289 |
| 1285 DataForRecursionFromChild<LayerType> data_from_child; | 1290 BuildPropertyTreesInternal(root_layer, data_for_recursion); |
| 1286 BuildPropertyTreesInternal(root_layer, data_for_recursion, &data_from_child); | |
| 1287 property_trees->needs_rebuild = false; | 1291 property_trees->needs_rebuild = false; |
| 1288 | 1292 |
| 1289 // The transform tree is kept up to date as it is built, but the | 1293 // The transform tree is kept up to date as it is built, but the |
| 1290 // combined_clips stored in the clip tree and the screen_space_opacity and | 1294 // combined_clips stored in the clip tree and the screen_space_opacity and |
| 1291 // is_drawn in the effect tree aren't computed during tree building. | 1295 // is_drawn in the effect tree aren't computed during tree building. |
| 1292 property_trees->transform_tree.set_needs_update(false); | 1296 property_trees->transform_tree.set_needs_update(false); |
| 1293 property_trees->clip_tree.set_needs_update(true); | 1297 property_trees->clip_tree.set_needs_update(true); |
| 1294 property_trees->effect_tree.set_needs_update(true); | 1298 property_trees->effect_tree.set_needs_update(true); |
| 1295 property_trees->scroll_tree.set_needs_update(false); | 1299 property_trees->scroll_tree.set_needs_update(false); |
| 1296 } | 1300 } |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 1326 float page_scale_factor, | 1330 float page_scale_factor, |
| 1327 float device_scale_factor, | 1331 float device_scale_factor, |
| 1328 const gfx::Rect& viewport, | 1332 const gfx::Rect& viewport, |
| 1329 const gfx::Transform& device_transform, | 1333 const gfx::Transform& device_transform, |
| 1330 PropertyTrees* property_trees) { | 1334 PropertyTrees* property_trees) { |
| 1331 property_trees->is_main_thread = true; | 1335 property_trees->is_main_thread = true; |
| 1332 property_trees->is_active = false; | 1336 property_trees->is_active = false; |
| 1333 SkColor color = root_layer->layer_tree_host()->background_color(); | 1337 SkColor color = root_layer->layer_tree_host()->background_color(); |
| 1334 if (SkColorGetA(color) != 255) | 1338 if (SkColorGetA(color) != 255) |
| 1335 color = SkColorSetA(color, 255); | 1339 color = SkColorSetA(color, 255); |
| 1340 if (root_layer->layer_tree_host()->has_copy_request()) | |
| 1341 UpdateSubtreeHasCopyRequestRecursive(root_layer); | |
| 1336 BuildPropertyTreesTopLevelInternal( | 1342 BuildPropertyTreesTopLevelInternal( |
| 1337 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 1343 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 1338 outer_viewport_scroll_layer, overscroll_elasticity_layer, | 1344 outer_viewport_scroll_layer, overscroll_elasticity_layer, |
| 1339 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, | 1345 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, |
| 1340 device_transform, property_trees, color); | 1346 device_transform, property_trees, color); |
| 1341 #if DCHECK_IS_ON() | 1347 #if DCHECK_IS_ON() |
| 1342 for (auto* layer : *root_layer->layer_tree_host()) | 1348 for (auto* layer : *root_layer->layer_tree_host()) |
| 1343 CheckScrollAndClipPointersForLayer(layer); | 1349 CheckScrollAndClipPointersForLayer(layer); |
| 1344 #endif | 1350 #endif |
| 1345 property_trees->ResetCachedData(); | 1351 property_trees->ResetCachedData(); |
| 1352 // During building property trees, all copy requests are moved from layers to | |
| 1353 // effect tree, which are then pushed at commit to compositor thread and | |
| 1354 // handled there. LayerTreeHost::has_copy_request is only required to | |
| 1355 // decide if we want to create a effect node. So, it can be reset now. | |
| 1356 root_layer->layer_tree_host()->SetHasCopyRequest(false); | |
|
weiliangc
2017/04/19 17:58:48
Since we always collect the copy requests with pro
jaydasika
2017/04/19 18:15:14
No, they are not equivalent. copy requests are add
| |
| 1346 } | 1357 } |
| 1347 | 1358 |
| 1348 void PropertyTreeBuilder::BuildPropertyTrees( | 1359 void PropertyTreeBuilder::BuildPropertyTrees( |
| 1349 LayerImpl* root_layer, | 1360 LayerImpl* root_layer, |
| 1350 const LayerImpl* page_scale_layer, | 1361 const LayerImpl* page_scale_layer, |
| 1351 const LayerImpl* inner_viewport_scroll_layer, | 1362 const LayerImpl* inner_viewport_scroll_layer, |
| 1352 const LayerImpl* outer_viewport_scroll_layer, | 1363 const LayerImpl* outer_viewport_scroll_layer, |
| 1353 const LayerImpl* overscroll_elasticity_layer, | 1364 const LayerImpl* overscroll_elasticity_layer, |
| 1354 const gfx::Vector2dF& elastic_overscroll, | 1365 const gfx::Vector2dF& elastic_overscroll, |
| 1355 float page_scale_factor, | 1366 float page_scale_factor, |
| 1356 float device_scale_factor, | 1367 float device_scale_factor, |
| 1357 const gfx::Rect& viewport, | 1368 const gfx::Rect& viewport, |
| 1358 const gfx::Transform& device_transform, | 1369 const gfx::Transform& device_transform, |
| 1359 PropertyTrees* property_trees) { | 1370 PropertyTrees* property_trees) { |
| 1360 // Preserve render surfaces when rebuilding. | 1371 // Preserve render surfaces when rebuilding. |
| 1361 std::vector<std::unique_ptr<RenderSurfaceImpl>> render_surfaces; | 1372 std::vector<std::unique_ptr<RenderSurfaceImpl>> render_surfaces; |
| 1362 property_trees->effect_tree.TakeRenderSurfaces(&render_surfaces); | 1373 property_trees->effect_tree.TakeRenderSurfaces(&render_surfaces); |
| 1363 property_trees->is_main_thread = false; | 1374 property_trees->is_main_thread = false; |
| 1364 property_trees->is_active = root_layer->IsActive(); | 1375 property_trees->is_active = root_layer->IsActive(); |
| 1365 SkColor color = root_layer->layer_tree_impl()->background_color(); | 1376 SkColor color = root_layer->layer_tree_impl()->background_color(); |
| 1366 if (SkColorGetA(color) != 255) | 1377 if (SkColorGetA(color) != 255) |
| 1367 color = SkColorSetA(color, 255); | 1378 color = SkColorSetA(color, 255); |
| 1379 UpdateSubtreeHasCopyRequestRecursive(root_layer); | |
| 1368 BuildPropertyTreesTopLevelInternal( | 1380 BuildPropertyTreesTopLevelInternal( |
| 1369 root_layer, page_scale_layer, inner_viewport_scroll_layer, | 1381 root_layer, page_scale_layer, inner_viewport_scroll_layer, |
| 1370 outer_viewport_scroll_layer, overscroll_elasticity_layer, | 1382 outer_viewport_scroll_layer, overscroll_elasticity_layer, |
| 1371 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, | 1383 elastic_overscroll, page_scale_factor, device_scale_factor, viewport, |
| 1372 device_transform, property_trees, color); | 1384 device_transform, property_trees, color); |
| 1373 property_trees->effect_tree.CreateOrReuseRenderSurfaces( | 1385 property_trees->effect_tree.CreateOrReuseRenderSurfaces( |
| 1374 &render_surfaces, root_layer->layer_tree_impl()); | 1386 &render_surfaces, root_layer->layer_tree_impl()); |
| 1375 property_trees->ResetCachedData(); | 1387 property_trees->ResetCachedData(); |
| 1376 } | 1388 } |
| 1377 | 1389 |
| 1378 } // namespace cc | 1390 } // namespace cc |
| OLD | NEW |