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

Unified Diff: cc/layers/layer.cc

Issue 1697613002: cc :: Move tracking of layer_property_changed to main thread (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 50c138fd65137f05d89f04144825278516143aff..24eed8d83eaecdf736cf5476231ea4955a107dab 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -366,6 +366,8 @@ void Layer::SetBounds(const gfx::Size& size) {
if (!layer_tree_host_)
return;
+ if (masks_to_bounds())
+ SetSubtreePropertyChanged();
SetNeedsCommit();
}
@@ -636,6 +638,7 @@ void Layer::SetPosition(const gfx::PointF& position) {
if (!layer_tree_host_)
return;
+ SetSubtreePropertyChanged();
if (TransformNode* transform_node =
layer_tree_host_->property_trees()->transform_tree.Node(
transform_tree_index())) {
@@ -643,6 +646,7 @@ void Layer::SetPosition(const gfx::PointF& position) {
transform_node->data.update_post_local_transform(position,
transform_origin());
transform_node->data.needs_local_transform_update = true;
+ transform_node->data.transform_changed = true;
layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
SetNeedsCommitNoRebuild();
return;
@@ -721,6 +725,7 @@ void Layer::SetTransformOrigin(const gfx::Point3F& transform_origin) {
if (!layer_tree_host_)
return;
+ SetSubtreePropertyChanged();
if (TransformNode* transform_node =
layer_tree_host_->property_trees()->transform_tree.Node(
transform_tree_index())) {
@@ -729,6 +734,7 @@ void Layer::SetTransformOrigin(const gfx::Point3F& transform_origin) {
transform_node->data.update_post_local_transform(position(),
transform_origin);
transform_node->data.needs_local_transform_update = true;
+ transform_node->data.transform_changed = true;
layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
SetNeedsCommitNoRebuild();
return;
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698