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

Unified Diff: cc/layers/layer.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
« no previous file with comments | « cc/layers/layer.h ('k') | 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 92492afa97d7fdc4e30719125a8cb325a2227f81..ab348dac2b8ca383b6a9b9670083f900c815d105 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1667,6 +1667,31 @@ void Layer::OnTransformIsPotentiallyAnimatingChanged(bool is_animating) {
}
}
+void Layer::OnOpacityIsCurrentlyAnimatingChanged(bool is_currently_animating) {
+ DCHECK(layer_tree_host_);
+ EffectTree& effect_tree = layer_tree_host_->property_trees()->effect_tree;
+ EffectNode* node = effect_tree.Node(effect_tree_index());
+ if (!node)
+ return;
+
+ if (node->owner_id == id())
+ node->data.is_currently_animating_opacity = is_currently_animating;
+}
+
+void Layer::OnOpacityIsPotentiallyAnimatingChanged(
+ bool has_potential_animation) {
+ DCHECK(layer_tree_host_);
+ EffectTree& effect_tree = layer_tree_host_->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 || OpacityCanAnimateOnImplThread();
+ effect_tree.set_needs_update(true);
+ }
+}
+
bool Layer::HasActiveAnimationForTesting() const {
return layer_tree_host_ ? layer_tree_host_->HasActiveAnimationForTesting(this)
: false;
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698