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

Unified Diff: cc/trees/layer_tree_host_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/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 97852176f80da1697da3ce3e18ad66f2df08d3a9..ee0b3e9bd640f60ee72fedba4fe833fb89d1531d 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3938,6 +3938,31 @@ void LayerTreeHostImpl::ElementTransformIsPotentiallyAnimatingChanged(
is_animating);
}
}
+void LayerTreeHostImpl::ElementOpacityIsAnimatingChanged(
+ ElementId element_id,
+ ElementListType list_type,
+ AnimationChangeType change_type,
+ bool is_animating) {
+ LayerTreeImpl* tree =
+ list_type == ElementListType::ACTIVE ? active_tree() : pending_tree();
+ if (!tree)
+ return;
+ LayerImpl* layer = tree->LayerById(element_id);
+ if (layer) {
+ switch (change_type) {
+ case AnimationChangeType::POTENTIAL:
+ layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::RUNNING:
+ layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::BOTH:
+ layer->OnOpacityIsPotentiallyAnimatingChanged(is_animating);
+ layer->OnOpacityIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ }
+ }
+}
void LayerTreeHostImpl::ScrollOffsetAnimationFinished() {
// TODO(majidvp): We should pass in the original starting scroll position here

Powered by Google App Engine
This is Rietveld 408576698