Chromium Code Reviews| Index: cc/trees/layer_tree_impl.cc |
| diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
| index 2c8fbb82b5d1e26fe3cbaf0d547f46bacc1bfebe..a0bf98e06e22b025df0d71e598c0deb7dbbe3510 100644 |
| --- a/cc/trees/layer_tree_impl.cc |
| +++ b/cc/trees/layer_tree_impl.cc |
| @@ -958,9 +958,29 @@ bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) { |
| if (it.represents_contributing_render_surface()) { |
| // Surfaces aren't used by the tile raster code, so they can have |
| // occlusion regardless of replicas. |
| + const RenderSurfaceImpl* occlusion_surface = |
| + occlusion_tracker.OcclusionSurfaceForContributingSurface(); |
| + gfx::Transform draw_transform; |
| + if (occlusion_surface) { |
| + // We are calculating transform between two render surfaces. So, we |
|
enne (OOO)
2016/07/14 19:51:41
I think Apply and Remove look too similar but do v
jaydasika
2016/07/14 21:00:46
I have renamed them to PostConcatSublayerScale and
|
| + // need to apply the sublayer scale at target and remove the sublayer |
| + // scale at source. |
| + property_trees()->transform_tree.ComputeTransform( |
| + it->render_surface()->TransformTreeIndex(), |
| + occlusion_surface->TransformTreeIndex(), &draw_transform); |
| + // We don't have to apply sublayer scale when target is root. |
| + if (occlusion_surface->TransformTreeIndex() != 0) |
| + draw_property_utils::ApplySublayerScale( |
| + occlusion_surface->EffectTreeIndex(), |
| + property_trees()->effect_tree, &draw_transform); |
| + draw_property_utils::RemoveSublayerScale( |
| + it->render_surface()->EffectTreeIndex(), |
| + property_trees()->effect_tree, &draw_transform); |
| + } |
| + |
| Occlusion occlusion = |
| occlusion_tracker.GetCurrentOcclusionForContributingSurface( |
| - it->render_surface()->draw_transform()); |
| + draw_transform); |
| it->render_surface()->set_occlusion_in_content_space(occlusion); |
| // Masks are used to draw the contributing surface, so should have |
| // the same occlusion as the surface (nothing inside the surface |