| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 // Lightweight subset of KeyframeEffect. | 41 // Lightweight subset of KeyframeEffect. |
| 42 // Used to transport data for deferred KeyframeEffect construction and one off I
nterpolation sampling. | 42 // Used to transport data for deferred KeyframeEffect construction and one off I
nterpolation sampling. |
| 43 class CORE_EXPORT InertEffect final : public AnimationEffect { | 43 class CORE_EXPORT InertEffect final : public AnimationEffect { |
| 44 public: | 44 public: |
| 45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double
inheritedTime); | 45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double
inheritedTime); |
| 46 void sample(Vector<RefPtr<Interpolation>>&) const; | 46 void sample(Vector<RefPtr<Interpolation>>&) const; |
| 47 EffectModel* model() const { return m_model.get(); } | 47 EffectModel* model() const { return m_model.get(); } |
| 48 bool paused() const { return m_paused; } | 48 bool paused() const { return m_paused; } |
| 49 | 49 |
| 50 bool isInertEffect() const final { return true; } |
| 51 |
| 50 DECLARE_VIRTUAL_TRACE(); | 52 DECLARE_VIRTUAL_TRACE(); |
| 51 | 53 |
| 52 protected: | 54 protected: |
| 53 void updateChildrenAndEffects() const override { } | 55 void updateChildrenAndEffects() const override { } |
| 54 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub
le timeToNextIteration) const override; | 56 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub
le timeToNextIteration) const override; |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime); | 59 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime); |
| 58 Member<EffectModel> m_model; | 60 Member<EffectModel> m_model; |
| 59 bool m_paused; | 61 bool m_paused; |
| 60 double m_inheritedTime; | 62 double m_inheritedTime; |
| 61 }; | 63 }; |
| 62 | 64 |
| 65 DEFINE_TYPE_CASTS(InertEffect, AnimationEffect, animationEffect, animationEffect
->isInertEffect(), animationEffect.isInertEffect()); |
| 66 |
| 63 } // namespace blink | 67 } // namespace blink |
| 64 | 68 |
| 65 #endif | 69 #endif |
| OLD | NEW |