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

Unified Diff: cc/layers/layer_impl.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 | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 804aa6627eea921af977513d71a33c0a9642b2ae..789d2a9660e985f0e03278250f599113584e27d5 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -778,6 +778,17 @@ void LayerImpl::SetStackingOrderChanged(bool stacking_order_changed) {
}
}
+bool LayerImpl::LayerPropertyChanged() const {
+ if (layer_property_changed_)
+ return true;
+ TransformNode* node =
+ layer_tree_impl()->property_trees()->transform_tree.Node(
+ transform_tree_index());
+ if (node && node->data.transform_changed)
+ return true;
+ return false;
+}
+
void LayerImpl::NoteLayerPropertyChanged() {
layer_property_changed_ = true;
layer_tree_impl()->set_needs_update_draw_properties();
@@ -820,6 +831,11 @@ const char* LayerImpl::LayerTypeAsString() const {
void LayerImpl::ResetAllChangeTrackingForSubtree() {
layer_property_changed_ = false;
+ if (TransformNode* transform_node =
+ layer_tree_impl_->property_trees()->transform_tree.Node(
+ transform_tree_index())) {
+ transform_node->data.transform_changed = false;
+ }
update_rect_.SetRect(0, 0, 0, 0);
damage_rect_.SetRect(0, 0, 0, 0);
@@ -1015,9 +1031,7 @@ void LayerImpl::SetBounds(const gfx::Size& bounds) {
layer_tree_impl()->DidUpdateScrollState(id());
- if (masks_to_bounds())
- NoteLayerPropertyChangedForSubtree();
- else
+ if (!masks_to_bounds())
NoteLayerPropertyChanged();
}
@@ -1119,7 +1133,6 @@ void LayerImpl::SetTransformOrigin(const gfx::Point3F& transform_origin) {
if (transform_origin_ == transform_origin)
return;
transform_origin_ = transform_origin;
- NoteLayerPropertyChangedForSubtree();
}
void LayerImpl::SetBackgroundColor(SkColor background_color) {
@@ -1296,7 +1309,6 @@ void LayerImpl::SetPosition(const gfx::PointF& position) {
return;
position_ = position;
- NoteLayerPropertyChangedForSubtree();
}
void LayerImpl::SetShouldFlattenTransform(bool flatten) {
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698