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

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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index d50c3a84faac2b98b081304b5548af4e37b3f814..8b51976759e03be20a7ca635d94d4db4f29d9f40 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1352,13 +1352,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(
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698