| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 void notifyElementDestroyed(); | 73 void notifyElementDestroyed(); |
| 74 | 74 |
| 75 bool isCandidateForAnimationOnCompositor() const; | 75 bool isCandidateForAnimationOnCompositor() const; |
| 76 // Must only be called once. | 76 // Must only be called once. |
| 77 bool maybeStartAnimationOnCompositor(double startTime, double timeOffset); | 77 bool maybeStartAnimationOnCompositor(double startTime, double timeOffset); |
| 78 bool hasActiveAnimationsOnCompositor() const; | 78 bool hasActiveAnimationsOnCompositor() const; |
| 79 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; | 79 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; |
| 80 void cancelAnimationOnCompositor(); | 80 void cancelAnimationOnCompositor(); |
| 81 void pauseAnimationForTestingOnCompositor(double pauseTime); | 81 void pauseAnimationForTestingOnCompositor(double pauseTime); |
| 82 | 82 |
| 83 virtual void trace(Visitor*); | |
| 84 | |
| 85 protected: | 83 protected: |
| 86 void applyEffects(); | 84 void applyEffects(); |
| 87 void clearEffects(); | 85 void clearEffects(); |
| 88 virtual void updateChildrenAndEffects() const override; | 86 virtual void updateChildrenAndEffects() const override; |
| 89 virtual void attach(AnimationPlayer*) override; | 87 virtual void attach(AnimationPlayer*) override; |
| 90 virtual void detach() override; | 88 virtual void detach() override; |
| 91 virtual void specifiedTimingChanged() override; | 89 virtual void specifiedTimingChanged() override; |
| 92 virtual double calculateTimeToEffectChange(bool forwards, double inheritedTi
me, double timeToNextIteration) const override; | 90 virtual double calculateTimeToEffectChange(bool forwards, double inheritedTi
me, double timeToNextIteration) const override; |
| 93 | 91 |
| 94 private: | 92 private: |
| 95 Animation(Element*, PassRefPtr<AnimationEffect>, const Timing&, Priority, Pa
ssOwnPtr<EventDelegate>); | 93 Animation(Element*, PassRefPtr<AnimationEffect>, const Timing&, Priority, Pa
ssOwnPtr<EventDelegate>); |
| 96 | 94 |
| 97 RawPtr<Element> m_target; | 95 RawPtr<Element> m_target; |
| 98 RefPtr<AnimationEffect> m_effect; | 96 RefPtr<AnimationEffect> m_effect; |
| 99 RawPtr<SampledEffect> m_sampledEffect; | 97 RawPtr<SampledEffect> m_sampledEffect; |
| 100 | 98 |
| 101 Priority m_priority; | 99 Priority m_priority; |
| 102 | 100 |
| 103 Vector<int> m_compositorAnimationIds; | 101 Vector<int> m_compositorAnimationIds; |
| 104 | 102 |
| 105 friend class AnimationAnimationV8Test; | 103 friend class AnimationAnimationV8Test; |
| 106 }; | 104 }; |
| 107 | 105 |
| 108 DEFINE_TYPE_CASTS(Animation, AnimationNode, animationNode, animationNode->isAnim
ation(), animationNode.isAnimation()); | 106 DEFINE_TYPE_CASTS(Animation, AnimationNode, animationNode, animationNode->isAnim
ation(), animationNode.isAnimation()); |
| 109 | 107 |
| 110 } // namespace blink | 108 } // namespace blink |
| 111 | 109 |
| 112 #endif // Animation_h | 110 #endif // Animation_h |
| OLD | NEW |