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

Unified Diff: cc/trees/layer_tree.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.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree.cc
diff --git a/cc/trees/layer_tree.cc b/cc/trees/layer_tree.cc
index b6ce2d29d2bedf48488deb58cda10e2095b125ff..1106d79ec3fc1c6f9f81182f7aedd0b39b337cbf 100644
--- a/cc/trees/layer_tree.cc
+++ b/cc/trees/layer_tree.cc
@@ -652,69 +652,13 @@ void LayerTree::SetElementScrollOffsetMutated(
layer->OnScrollOffsetAnimated(scroll_offset);
}
-void LayerTree::ElementTransformIsAnimatingChanged(
- ElementId element_id,
- ElementListType list_type,
- AnimationChangeType change_type,
- bool is_animating) {
- Layer* layer = 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 LayerTree::ElementOpacityIsAnimatingChanged(
- ElementId element_id,
- ElementListType list_type,
- AnimationChangeType change_type,
- bool is_animating) {
- Layer* layer = 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 LayerTree::ElementFilterIsAnimatingChanged(ElementId element_id,
- ElementListType list_type,
- AnimationChangeType change_type,
- bool is_animating) {
+void LayerTree::ElementIsAnimatingChanged(ElementId element_id,
+ ElementListType list_type,
+ const PropertyAnimationState& mask,
+ const PropertyAnimationState& state) {
Layer* layer = 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);
}
gfx::ScrollOffset LayerTree::GetScrollOffsetForAnimation(
« no previous file with comments | « cc/trees/layer_tree.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698