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

Unified Diff: cc/layers/layer_impl.cc

Issue 1987123002: cc : Track transform animation changes on transform tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/proto/property_tree.proto » ('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 a12963f2ac14849b375456a8497a7ee60e72182d..e69e8f1eeea2f9b1e2a14b1a6259a9e1b2587e78 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -679,8 +679,8 @@ void LayerImpl::UpdatePropertyTreeTransformIsAnimated(bool is_animated) {
// node).
if (node->owner_id != id())
return;
- if (node->data.is_animated != is_animated) {
- node->data.is_animated = is_animated;
+ if (node->data.has_potential_animation != is_animated) {
+ node->data.has_potential_animation = is_animated;
if (is_animated) {
float maximum_target_scale = 0.f;
node->data.local_maximum_animation_target_scale =
@@ -786,8 +786,22 @@ void LayerImpl::OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) {
layer_tree_impl_->DidAnimateScrollOffset();
}
-void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) {
- UpdatePropertyTreeTransformIsAnimated(is_animating);
+void LayerImpl::OnTransformIsCurrentlyAnimatingChanged(
+ bool is_currently_animating) {
+ DCHECK(layer_tree_impl_);
+ TransformTree& transform_tree =
+ layer_tree_impl_->property_trees()->transform_tree;
+ TransformNode* node = transform_tree.Node(transform_tree_index());
+ if (!node)
+ return;
+
+ if (node->owner_id == id())
+ node->data.is_currently_animating = is_currently_animating;
+}
+
+void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(
+ bool has_potential_animation) {
+ UpdatePropertyTreeTransformIsAnimated(has_potential_animation);
was_ever_ready_since_last_transform_animation_ = false;
}
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/proto/property_tree.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698