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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2357533002: CC Animation: Use std::bitset to update animation state. (Closed)
Patch Set: Reparent. Created 4 years, 2 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_impl.h ('k') | cc/trees/mutator_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e2f030db3572957978629a976ba005350b1499db..8a67a401c76dfd96b76e62c8263145926814df02 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -4006,82 +4006,18 @@ void LayerTreeHostImpl::SetElementScrollOffsetMutated(
}
}
-void LayerTreeHostImpl::ElementTransformIsAnimatingChanged(
+void LayerTreeHostImpl::ElementIsAnimatingChanged(
ElementId element_id,
ElementListType list_type,
- AnimationChangeType change_type,
- bool is_animating) {
+ const PropertyAnimationState& mask,
+ const PropertyAnimationState& state) {
LayerTreeImpl* tree =
list_type == ElementListType::ACTIVE ? active_tree() : pending_tree();
if (!tree)
return;
LayerImpl* layer = tree->LayerByElementId(element_id);
- 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 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->LayerByElementId(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::ElementFilterIsAnimatingChanged(
- 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->LayerByElementId(element_id);
- if (layer) {
- switch (change_type) {
- case AnimationChangeType::POTENTIAL:
- layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
- break;
- case AnimationChangeType::RUNNING:
- layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
- break;
- case AnimationChangeType::BOTH:
- layer->OnFilterIsPotentiallyAnimatingChanged(is_animating);
- layer->OnFilterIsCurrentlyAnimatingChanged(is_animating);
- break;
- }
- }
+ if (layer)
+ layer->OnIsAnimatingChanged(mask, state);
}
void LayerTreeHostImpl::ScrollOffsetAnimationFinished() {
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/mutator_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698