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

Unified Diff: cc/trees/layer_tree_host.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.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index f41bc9fea43e116e44e5cb744e9d05c65199a90c..9e8e07c18066632c3c9f42abf741a0cfbeaffe7a 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1361,6 +1361,28 @@ void LayerTreeHost::ElementTransformIsPotentiallyAnimatingChanged(
layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
}
+void LayerTreeHost::ElementOpacityIsAnimatingChanged(
+ ElementId element_id,
+ ElementListType list_type,
+ AnimationChangeType change_type,
+ bool is_animating) {
+ Layer* layer = 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;
+ }
+ }
+}
+
gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation(
ElementId element_id) const {
Layer* layer = LayerById(element_id);

Powered by Google App Engine
This is Rietveld 408576698