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

Unified Diff: cc/animation/animation_player.h

Issue 2357533002: CC Animation: Use std::bitset to update animation state. (Closed)
Patch Set: Clean it up. Created 4 years, 3 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 | « no previous file | cc/animation/animation_player.cc » ('j') | cc/animation/element_animations.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation_player.h
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index 491f6fdf5cb88b915f93dc90e59246fb3c209809..43ee17505b206bd8ea8f2cade781aa84f1c1cf5c 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -5,7 +5,6 @@
#ifndef CC_ANIMATION_ANIMATION_PLAYER_H_
#define CC_ANIMATION_ANIMATION_PLAYER_H_
-#include <bitset>
#include <vector>
#include "base/macros.h"
@@ -107,10 +106,8 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer> {
// Make animations affect active elements if and only if they affect
// pending elements. Any animations that no longer affect any elements
- // are deleted.
- void ActivateAnimations(bool* changed_transform_animation,
- bool* changed_opacity_animation,
- bool* changed_filter_animation);
+ // are deleted. Returns a set of properties with animations activated.
+ TargetProperties ActivateAnimations();
bool HasFilterAnimationThatInflatesBounds() const;
bool HasTransformAnimationThatInflatesBounds() const;
@@ -152,8 +149,8 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer> {
// Returns the active animation for the given unique animation id.
Animation* GetAnimationById(int animation_id) const;
- void GetPropertyAnimationStateFor(TargetProperty::Type property,
- PropertyAnimationState* state) const;
+ void GetPropertyAnimationState(PropertyAnimationState* pending_state,
+ PropertyAnimationState* active_state) const;
private:
friend class base::RefCounted<AnimationPlayer>;
@@ -161,10 +158,6 @@ class CC_EXPORT AnimationPlayer : public base::RefCounted<AnimationPlayer> {
explicit AnimationPlayer(int id);
~AnimationPlayer();
- // A set of target properties. TargetProperty must be 0-based enum.
- using TargetProperties =
- std::bitset<TargetProperty::LAST_TARGET_PROPERTY + 1>;
-
void SetNeedsCommit();
void RegisterPlayer();
« no previous file with comments | « no previous file | cc/animation/animation_player.cc » ('j') | cc/animation/element_animations.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698