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

Unified Diff: Source/core/animation/css/CSSAnimations.h

Issue 194673002: Web Animations: Refactor KeyframeEffectModel to work via an InterpolationEffect. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@interpolationWrap
Patch Set: Created 6 years, 9 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: Source/core/animation/css/CSSAnimations.h
diff --git a/Source/core/animation/css/CSSAnimations.h b/Source/core/animation/css/CSSAnimations.h
index 22b7a1fd25afc80ae5bf5f7b771ad32ab1f927cc..3f453d68070fb03aa1be25ab66d3167a65d33305 100644
--- a/Source/core/animation/css/CSSAnimations.h
+++ b/Source/core/animation/css/CSSAnimations.h
@@ -33,6 +33,7 @@
#include "core/animation/Animation.h"
#include "core/animation/InertAnimation.h"
+#include "core/animation/Interpolation.h"
#include "core/animation/Player.h"
#include "core/animation/css/CSSAnimationData.h"
#include "core/css/StylePropertySet.h"
@@ -50,7 +51,7 @@ class StyleResolver;
class StyleRuleKeyframes;
// This class stores the CSS Animations/Transitions information we use during a style recalc.
-// This includes updates to animations/transitions as well as the CompositableValueMaps to be applied.
+// This includes updates to animations/transitions as well as the Interpolations to be applied.
class CSSAnimationUpdate FINAL {
public:
void startAnimation(AtomicString& animationName, const HashSet<RefPtr<InertAnimation> >& animations)
@@ -104,11 +105,11 @@ public:
const NewTransitionMap& newTransitions() const { return m_newTransitions; }
const HashSet<CSSPropertyID>& cancelledTransitions() const { return m_cancelledTransitions; }
- void adoptCompositableValuesForAnimations(AnimationEffect::CompositableValueMap& newMap) { newMap.swap(m_compositableValuesForAnimations); }
- void adoptCompositableValuesForTransitions(AnimationEffect::CompositableValueMap& newMap) { newMap.swap(m_compositableValuesForTransitions); }
- const AnimationEffect::CompositableValueMap& compositableValuesForAnimations() const { return m_compositableValuesForAnimations; }
- const AnimationEffect::CompositableValueMap& compositableValuesForTransitions() const { return m_compositableValuesForTransitions; }
- AnimationEffect::CompositableValueMap& compositableValuesForAnimations() { return m_compositableValuesForAnimations; }
+ void adoptActiveInterpolationsForAnimations(HashMap<CSSPropertyID, RefPtr<Interpolation> >& newMap) { newMap.swap(m_activeInterpolationsForAnimations); }
+ void adoptActiveInterpolationsForTransitions(HashMap<CSSPropertyID, RefPtr<Interpolation> >& newMap) { newMap.swap(m_activeInterpolationsForTransitions); }
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsForAnimations() const { return m_activeInterpolationsForAnimations; }
+ const HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsForTransitions() const { return m_activeInterpolationsForTransitions; }
+ HashMap<CSSPropertyID, RefPtr<Interpolation> >& activeInterpolationsForAnimations() { return m_activeInterpolationsForAnimations; }
bool isEmpty() const
{
@@ -118,8 +119,8 @@ public:
&& m_animationsWithPauseToggled.isEmpty()
&& m_newTransitions.isEmpty()
&& m_cancelledTransitions.isEmpty()
- && m_compositableValuesForAnimations.isEmpty()
- && m_compositableValuesForTransitions.isEmpty();
+ && m_activeInterpolationsForAnimations.isEmpty()
+ && m_activeInterpolationsForTransitions.isEmpty();
}
private:
// Order is significant since it defines the order in which new animations
@@ -134,8 +135,8 @@ private:
NewTransitionMap m_newTransitions;
HashSet<CSSPropertyID> m_cancelledTransitions;
- AnimationEffect::CompositableValueMap m_compositableValuesForAnimations;
- AnimationEffect::CompositableValueMap m_compositableValuesForTransitions;
+ HashMap<CSSPropertyID, RefPtr<Interpolation> > m_activeInterpolationsForAnimations;
+ HashMap<CSSPropertyID, RefPtr<Interpolation> > m_activeInterpolationsForTransitions;
};
class CSSAnimations FINAL {
@@ -172,14 +173,14 @@ private:
TransitionMap m_transitions;
OwnPtr<CSSAnimationUpdate> m_pendingUpdate;
- AnimationEffect::CompositableValueMap m_previousCompositableValuesForAnimations;
+ HashMap<CSSPropertyID, RefPtr<Interpolation> > m_previousActiveInterpolationsForAnimations;
static void calculateAnimationUpdate(CSSAnimationUpdate*, Element*, const Element& parentElement, const RenderStyle&, RenderStyle* parentStyle, StyleResolver*);
static void calculateTransitionUpdate(CSSAnimationUpdate*, const Element*, const RenderStyle&);
static void calculateTransitionUpdateForProperty(CSSPropertyID, const CSSAnimationData*, const RenderStyle& oldStyle, const RenderStyle&, const TransitionMap* activeTransitions, CSSAnimationUpdate*, const Element*);
- static void calculateAnimationCompositableValues(CSSAnimationUpdate*, const Element*);
- static void calculateTransitionCompositableValues(CSSAnimationUpdate*, const Element*);
+ static void calculateAnimationActiveInterpolations(CSSAnimationUpdate*, const Element*);
+ static void calculateTransitionActiveInterpolations(CSSAnimationUpdate*, const Element*);
class AnimationEventDelegate FINAL : public TimedItem::EventDelegate {
public:

Powered by Google App Engine
This is Rietveld 408576698