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

Unified Diff: cc/layers/layer_impl.cc

Issue 1957533002: cc : Track opacity animation changes on effect 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
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index e5ea46ffb0247ebe0bbcf1b0ce747138a934782f..4dc3b72c904b7a2ec84fbf36959f1be038874011 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -784,6 +784,31 @@ void LayerImpl::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) {
was_ever_ready_since_last_transform_animation_ = false;
}
+void LayerImpl::OnOpacityIsCurrentlyAnimatingChanged(
+ bool is_currently_animating) {
+ DCHECK(layer_tree_impl_);
+ EffectTree& effect_tree = layer_tree_impl_->property_trees()->effect_tree;
+ EffectNode* node = effect_tree.Node(effect_tree_index());
+ if (!node)
ajuma 2016/05/09 16:56:55 Here too, when does the layer have an invalid prop
jaydasika 2016/05/10 20:22:29 In a couple of tests. I have modified those tests
+ return;
+
+ if (node->owner_id == id())
+ node->data.is_currently_animating_opacity = is_currently_animating;
+}
+
+void LayerImpl::OnOpacityIsPotentiallyAnimatingChanged(
+ bool has_potential_animation) {
+ DCHECK(layer_tree_impl_);
+ EffectTree& effect_tree = layer_tree_impl_->property_trees()->effect_tree;
+ EffectNode* node = effect_tree.Node(effect_tree_index());
+ if (!node)
+ return;
+ if (node->owner_id == id()) {
+ node->data.has_potential_opacity_animation = has_potential_animation;
+ effect_tree.set_needs_update(true);
+ }
+}
+
bool LayerImpl::IsActive() const {
return layer_tree_impl_->IsActiveTree();
}

Powered by Google App Engine
This is Rietveld 408576698