Chromium Code Reviews| Index: cc/trees/layer_tree_host_common.cc |
| diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc |
| index a645a1622041ad42bb3af8066b096806b63e3b03..94b29fbf0d09615d2cd8bcf5358d2d83c67acdde 100644 |
| --- a/cc/trees/layer_tree_host_common.cc |
| +++ b/cc/trees/layer_tree_host_common.cc |
| @@ -186,13 +186,19 @@ void ScrollAndScaleSet::FromProtobuf(const proto::ScrollAndScaleSet& proto) { |
| } |
| static inline void SetMaskLayersAreDrawnRenderSurfaceLayerListMembers( |
| - LayerImpl* layer) { |
| - if (layer->mask_layer()) |
| + LayerImpl* layer, |
| + PropertyTrees* property_trees) { |
| + if (layer->mask_layer()) { |
| layer->mask_layer()->set_is_drawn_render_surface_layer_list_member(true); |
| + draw_property_utils::ComputeMaskDrawProperties(layer->mask_layer(), |
| + property_trees); |
| + } |
| if (layer->replica_layer() && layer->replica_layer()->mask_layer()) { |
| layer->replica_layer() |
| ->mask_layer() |
| ->set_is_drawn_render_surface_layer_list_member(true); |
| + draw_property_utils::ComputeMaskDrawProperties( |
| + layer->replica_layer()->mask_layer(), property_trees); |
| } |
| } |
| @@ -458,7 +464,7 @@ static void ComputeListOfNonEmptySurfaces(LayerTreeImpl* layer_tree_impl, |
| } |
| continue; |
| } |
| - SetMaskLayersAreDrawnRenderSurfaceLayerListMembers(layer); |
| + SetMaskLayersAreDrawnRenderSurfaceLayerListMembers(layer, property_trees); |
| final_surface_list->push_back(layer); |
| } |
| } |
| @@ -491,20 +497,6 @@ static void CalculateRenderSurfaceLayerList( |
| &property_trees->scroll_tree); |
| } |
| -static void ComputeMaskLayerDrawProperties(const LayerImpl* layer, |
| - LayerImpl* mask_layer) { |
| - DrawProperties& mask_layer_draw_properties = mask_layer->draw_properties(); |
| - mask_layer_draw_properties.visible_layer_rect = gfx::Rect(layer->bounds()); |
| - mask_layer_draw_properties.target_space_transform = |
| - layer->draw_properties().target_space_transform; |
|
ajuma
2016/06/07 17:59:39
Target space transform used to be needed to pick a
|
| - mask_layer_draw_properties.screen_space_transform = |
| - layer->draw_properties().screen_space_transform; |
| - mask_layer_draw_properties.maximum_animation_contents_scale = |
| - layer->draw_properties().maximum_animation_contents_scale; |
| - mask_layer_draw_properties.starting_animation_contents_scale = |
| - layer->draw_properties().starting_animation_contents_scale; |
|
ajuma
2016/06/07 17:59:39
We were previously setting but never using animati
|
| -} |
| - |
| void CalculateDrawPropertiesInternal( |
| LayerTreeHostCommon::CalcDrawPropsImplInputs* inputs, |
| PropertyTreeOption property_tree_option) { |
| @@ -590,12 +582,6 @@ void CalculateDrawPropertiesInternal( |
| for (LayerImpl* layer : visible_layer_list) { |
| draw_property_utils::ComputeLayerDrawProperties(layer, |
| inputs->property_trees); |
| - if (layer->mask_layer()) |
| - ComputeMaskLayerDrawProperties(layer, layer->mask_layer()); |
| - LayerImpl* replica_mask_layer = |
| - layer->replica_layer() ? layer->replica_layer()->mask_layer() : nullptr; |
| - if (replica_mask_layer) |
| - ComputeMaskLayerDrawProperties(layer, replica_mask_layer); |
| } |
| CalculateRenderSurfaceLayerList( |