Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2389)

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2148383005: cc: Use sublayer scale from effect tree (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index e97ee7f74d9b7a6e812f816b8ca43401673eb786..84406c529331038908f95a68062552e1179b6ef7 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -963,20 +963,23 @@ bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) {
gfx::Transform draw_transform;
if (occlusion_surface) {
// We are calculating transform between two render surfaces. So, we
- // need to apply the sublayer scale at target and remove the sublayer
- // scale at source.
+ // need to apply the surface contents scale at target and remove the
+ // surface contents 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.
+ // We don't have to apply surface contents scale when target is root.
if (occlusion_surface->TransformTreeIndex() != 0) {
- draw_property_utils::PostConcatSublayerScale(
- occlusion_surface->EffectTreeIndex(),
- property_trees()->effect_tree, &draw_transform);
+ const EffectNode* occlusion_effect_node =
+ property_trees()->effect_tree.Node(
+ occlusion_surface->EffectTreeIndex());
+ draw_property_utils::PostConcatSurfaceContentsScale(
+ occlusion_effect_node, &draw_transform);
}
- draw_property_utils::ConcatInverseSublayerScale(
- it->render_surface()->EffectTreeIndex(),
- property_trees()->effect_tree, &draw_transform);
+ const EffectNode* effect_node = property_trees()->effect_tree.Node(
+ it->render_surface()->EffectTreeIndex());
+ draw_property_utils::ConcatInverseSurfaceContentsScale(
+ effect_node, &draw_transform);
}
Occlusion occlusion =
@@ -1664,7 +1667,7 @@ static const gfx::Transform SurfaceScreenSpaceTransform(
DCHECK(layer->render_surface());
return layer->is_drawn_render_surface_layer_list_member()
? layer->render_surface()->screen_space_transform()
- : transform_tree.ToScreenSpaceTransformWithoutSublayerScale(
+ : transform_tree.ToScreenSpaceTransformWithoutSurfaceContentsScale(
layer->render_surface()->TransformTreeIndex());
}
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698