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

Unified Diff: cc/animation/element_animations.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
Index: cc/animation/element_animations.h
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index b8ed8d61bb3b6ae62a2caa87eb1c0f136102003a..ba7c02bc041dfb40cb193da3c72607bf133d6cd1 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -181,10 +181,9 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
void SetNeedsPushProperties();
bool needs_push_properties() const { return needs_push_properties_; }
- // TODO(loyso): Rework UpdateClientAnimationState to use bitset.
void UpdateClientAnimationState(TargetProperty::Type target_property);
- void UpdateClientAnimationState(bool transform, bool opacity, bool filter);
- void SetNeedsUpdateImplClientState(bool transform, bool opacity, bool filter);
+ void UpdateClientAnimationState(TargetProperties target_properties);
+ void SetNeedsUpdateImplClientState(TargetProperties target_properties);
void UpdateActivationNormal();
@@ -211,13 +210,7 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
enum class ActivationType { NORMAL, FORCE };
void UpdateActivation(ActivationType type);
- void UpdateClientAnimationStateInternal(TargetProperty::Type property);
-
- void NotifyClientAnimationChanged(
- TargetProperty::Type property,
- ElementListType list_type,
- bool notify_elements_about_potential_animation,
- bool notify_elements_about_running_animation);
+ void UpdateClientAnimationStateInternal(TargetProperties properties);
void OnFilterAnimated(ElementListType list_type,
const FilterOperations& filters);
@@ -226,12 +219,8 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
const gfx::Transform& transform);
void OnScrollOffsetAnimated(ElementListType list_type,
const gfx::ScrollOffset& scroll_offset);
- void IsAnimatingChanged(ElementListType list_type,
- TargetProperty::Type property,
- AnimationChangeType change_type,
- bool is_animating);
- void ClearNeedsUpdateImplClientState();
+ static TargetProperties GetPropertiesMaskForAnimationState();
PlayersList players_list_;
AnimationHost* animation_host_;
@@ -249,13 +238,10 @@ class CC_EXPORT ElementAnimations : public base::RefCounted<ElementAnimations> {
bool needs_push_properties_;
- PropertyAnimationState filter_animation_state_;
- PropertyAnimationState opacity_animation_state_;
- PropertyAnimationState transform_animation_state_;
+ PropertyAnimationState active_state_;
+ PropertyAnimationState pending_state_;
- bool needs_update_impl_client_state_transform_ : 1;
- bool needs_update_impl_client_state_opacity_ : 1;
- bool needs_update_impl_client_state_filter_ : 1;
+ TargetProperties needs_update_impl_client_state_properties_;
DISALLOW_COPY_AND_ASSIGN(ElementAnimations);
};

Powered by Google App Engine
This is Rietveld 408576698