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

Unified Diff: cc/trees/property_tree.cc

Issue 2490773002: cc : Set 'needs update' on transform tree only when something changes (Closed)
Patch Set: unittest Created 4 years, 1 month 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 | « no previous file | cc/trees/property_tree_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index a572211abc73628963546b4121173a388ef50eb3..457b7611f082bcdf93f9c6861aaffcb7cf19dd44 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -679,15 +679,18 @@ void TransformTree::SetRootTransformsAndScales(
gfx::Transform root_from_screen;
bool invertible = root_to_screen.GetInverse(&root_from_screen);
DCHECK(invertible);
- SetToScreen(kRootNodeId, root_to_screen);
- SetFromScreen(kRootNodeId, root_from_screen);
- set_needs_update(true);
+ if (root_to_screen != ToScreen(kRootNodeId)) {
+ SetToScreen(kRootNodeId, root_to_screen);
+ SetFromScreen(kRootNodeId, root_from_screen);
+ set_needs_update(true);
+ }
transform.ConcatTransform(root_from_screen);
TransformNode* contents_root_node = Node(kContentsRootNodeId);
if (contents_root_node->post_local != transform) {
contents_root_node->post_local = transform;
contents_root_node->needs_local_transform_update = true;
+ set_needs_update(true);
}
}
« no previous file with comments | « no previous file | cc/trees/property_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698