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 ccaf894505bdb567968dff4ae419797e194108b6..8c8e6a99de378612b1f90d90729b944b4eff83fb 100644 |
| --- a/cc/trees/layer_tree_host_common.cc |
| +++ b/cc/trees/layer_tree_host_common.cc |
| @@ -932,9 +932,39 @@ static inline void UpdateLayerScaleDrawProperties( |
| layer->draw_properties().device_scale_factor = device_scale_factor; |
| } |
| -template <typename LayerType> |
| static inline void CalculateContentsScale( |
| - LayerType* layer, |
| + LayerImpl* layer, |
| + float contents_scale, |
| + float device_scale_factor, |
| + float page_scale_factor, |
| + float maximum_animation_contents_scale, |
| + bool animating_transform_to_screen) { |
| + layer->draw_properties().contents_scale_x = layer->contents_scale_x(); |
|
danakj
2014/06/13 15:00:27
This is just setting x=x; which we don't need to d
sohanjg
2014/06/13 15:36:06
Done.
|
| + layer->draw_properties().contents_scale_y = layer->contents_scale_y(); |
| + layer->draw_properties().content_bounds = layer->content_bounds(); |
| + |
| + LayerImpl* mask_layer = layer->mask_layer(); |
| + if (mask_layer) { |
| + mask_layer->draw_properties().contents_scale_x = |
| + mask_layer->contents_scale_x(); |
| + mask_layer->draw_properties().contents_scale_y = |
| + mask_layer->contents_scale_y(); |
| + mask_layer->draw_properties().content_bounds = mask_layer->content_bounds(); |
| + } |
| + |
| + LayerImpl* replica_mask_layer = |
| + layer->replica_layer() ? layer->replica_layer()->mask_layer() : NULL; |
| + if (replica_mask_layer) { |
| + replica_mask_layer->draw_properties().contents_scale_x = |
| + replica_mask_layer->contents_scale_x(); |
| + replica_mask_layer->draw_properties().contents_scale_y = |
| + replica_mask_layer->contents_scale_y(); |
| + replica_mask_layer->draw_properties().content_bounds = |
| + replica_mask_layer->content_bounds(); |
| + } |
| +} |
| +static inline void CalculateContentsScale( |
|
danakj
2014/06/13 15:00:27
blank line between methods
sohanjg
2014/06/13 15:36:06
Done.
|
| + Layer* layer, |
| float contents_scale, |
| float device_scale_factor, |
| float page_scale_factor, |
| @@ -949,7 +979,7 @@ static inline void CalculateContentsScale( |
| &layer->draw_properties().contents_scale_y, |
| &layer->draw_properties().content_bounds); |
| - LayerType* mask_layer = layer->mask_layer(); |
| + Layer* mask_layer = layer->mask_layer(); |
| if (mask_layer) { |
| mask_layer->CalculateContentsScale( |
| contents_scale, |
| @@ -962,7 +992,7 @@ static inline void CalculateContentsScale( |
| &mask_layer->draw_properties().content_bounds); |
| } |
| - LayerType* replica_mask_layer = |
| + Layer* replica_mask_layer = |
| layer->replica_layer() ? layer->replica_layer()->mask_layer() : NULL; |
| if (replica_mask_layer) { |
| replica_mask_layer->CalculateContentsScale( |