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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2454203002: Revert of cc : Move screen space scale factor to root transform node (Closed)
Patch Set: Created 4 years, 2 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_common_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 f0cc76d64905c89a01b8d1bc5c4108ae7e1f7624..9ae1138aa87c3ebd4c372037af0d5ae5597827cd 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1033,11 +1033,15 @@
property_trees()->ComputeTransformToTarget(
it->render_surface()->TransformTreeIndex(),
occlusion_surface->EffectTreeIndex(), &draw_transform);
- const EffectNode* occlusion_effect_node =
- property_trees()->effect_tree.Node(
- occlusion_surface->EffectTreeIndex());
- draw_property_utils::PostConcatSurfaceContentsScale(
- occlusion_effect_node, &draw_transform);
+ // We don't have to apply surface contents scale when target is root.
+ if (occlusion_surface->EffectTreeIndex() !=
+ EffectTree::kContentsRootNodeId) {
+ const EffectNode* occlusion_effect_node =
+ property_trees()->effect_tree.Node(
+ occlusion_surface->EffectTreeIndex());
+ draw_property_utils::PostConcatSurfaceContentsScale(
+ occlusion_effect_node, &draw_transform);
+ }
const EffectNode* effect_node = property_trees()->effect_tree.Node(
it->render_surface()->EffectTreeIndex());
draw_property_utils::ConcatInverseSurfaceContentsScale(
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698