Index: third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h |
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h |
index 44e5ac083c97784dbeaba23214c450905f85f654..a7718f685c5567072b912bc2d0374d27afb17331 100644 |
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h |
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectReadOnly.h |
@@ -11,11 +11,12 @@ |
namespace blink { |
-class KeyframeEffectOptions; |
class DictionarySequenceOrDictionary; |
class Element; |
class ExceptionState; |
class ExecutionContext; |
+class KeyframeEffectOptions; |
+class PropertyHandle; |
class SampledEffect; |
// Represents the effect of an Animation on an Element's properties. |
@@ -48,11 +49,39 @@ class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { |
bool isKeyframeEffectReadOnly() const override { return true; } |
+ bool affects(PropertyHandle) const; |
+ const EffectModel* model() const { return m_model.get(); } |
+ EffectModel* model() { return m_model.get(); } |
+ void setModel(EffectModel* model) { m_model = model; } |
Priority getPriority() const { return m_priority; } |
- void downgradeToNormal() { m_priority = DefaultPriority; } |
+ Element* target() const { return m_target; } |
+ |
+ void notifySampledEffectRemovedFromAnimationStack(); |
+ |
+ bool isCandidateForAnimationOnCompositor(double animationPlaybackRate) const; |
+ // Must only be called once. |
+ bool maybeStartAnimationOnCompositor(int group, |
+ double startTime, |
+ double timeOffset, |
+ double animationPlaybackRate); |
+ bool hasActiveAnimationsOnCompositor() const; |
+ bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; |
+ bool cancelAnimationOnCompositor(); |
+ void restartAnimationOnCompositor(); |
+ void cancelIncompatibleAnimationsOnCompositor(); |
+ void pauseAnimationForTestingOnCompositor(double pauseTime); |
+ |
+ void attachCompositedLayers(); |
+ |
+ void setCompositorAnimationIdsForTesting( |
+ const Vector<int>& compositorAnimationIds) { |
+ m_compositorAnimationIds = compositorAnimationIds; |
+ } |
DECLARE_VIRTUAL_TRACE(); |
+ void downgradeToNormal() { m_priority = DefaultPriority; } |
+ |
protected: |
KeyframeEffectReadOnly(Element*, |
EffectModel*, |
@@ -60,11 +89,26 @@ class CORE_EXPORT KeyframeEffectReadOnly : public AnimationEffectReadOnly { |
Priority, |
EventDelegate*); |
+ void applyEffects(); |
+ void clearEffects(); |
+ void updateChildrenAndEffects() const override; |
+ void attach(Animation*) override; |
+ void detach() override; |
+ void specifiedTimingChanged() override; |
+ double calculateTimeToEffectChange(bool forwards, |
+ double inheritedTime, |
+ double timeToNextIteration) const override; |
+ virtual bool hasIncompatibleStyle(); |
+ bool hasMultipleTransformProperties() const; |
+ |
+ private: |
Member<Element> m_target; |
Member<EffectModel> m_model; |
Member<SampledEffect> m_sampledEffect; |
Priority m_priority; |
+ |
+ Vector<int> m_compositorAnimationIds; |
}; |
// TODO(suzyh): Replace calls to toKeyframeEffect with toKeyframeEffectReadOnly |