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

Unified Diff: cc/trees/layer_tree_host.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
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index d0f344ff203f7c357e38b7b450408c35eb1a645d..81d37ec01f8759382452e5b373303cd994fc0d42 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1344,13 +1344,26 @@ void LayerTreeHost::SetElementScrollOffsetMutated(
layer->OnScrollOffsetAnimated(scroll_offset);
}
-void LayerTreeHost::ElementTransformIsPotentiallyAnimatingChanged(
+void LayerTreeHost::ElementTransformIsAnimatingChanged(
ElementId element_id,
ElementListType list_type,
+ AnimationChangeType change_type,
bool is_animating) {
Layer* layer = LayerById(element_id);
- DCHECK(layer);
- layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
+ if (layer) {
+ switch (change_type) {
+ case AnimationChangeType::POTENTIAL:
+ layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::RUNNING:
+ layer->OnTransformIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ case AnimationChangeType::BOTH:
+ layer->OnTransformIsPotentiallyAnimatingChanged(is_animating);
+ layer->OnTransformIsCurrentlyAnimatingChanged(is_animating);
+ break;
+ }
+ }
}
void LayerTreeHost::ElementOpacityIsAnimatingChanged(

Powered by Google App Engine
This is Rietveld 408576698