| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef KeyframeEffectReadOnly_h | 5 #ifndef KeyframeEffectReadOnly_h |
| 6 #define KeyframeEffectReadOnly_h | 6 #define KeyframeEffectReadOnly_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/animation/AnimationEffectReadOnly.h" | 9 #include "core/animation/AnimationEffectReadOnly.h" |
| 10 #include "core/animation/EffectModel.h" | 10 #include "core/animation/EffectModel.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 static KeyframeEffectReadOnly* create( | 48 static KeyframeEffectReadOnly* create( |
| 49 ExecutionContext*, | 49 ExecutionContext*, |
| 50 Element*, | 50 Element*, |
| 51 const DictionarySequenceOrDictionary& effectInput, | 51 const DictionarySequenceOrDictionary& effectInput, |
| 52 ExceptionState&); | 52 ExceptionState&); |
| 53 | 53 |
| 54 ~KeyframeEffectReadOnly() override {} | 54 ~KeyframeEffectReadOnly() override {} |
| 55 | 55 |
| 56 bool isKeyframeEffectReadOnly() const override { return true; } | 56 bool isKeyframeEffectReadOnly() const override { return true; } |
| 57 | 57 |
| 58 bool affects(PropertyHandle) const; | 58 bool affects(const PropertyHandle&) const; |
| 59 const EffectModel* model() const { return m_model.get(); } | 59 const EffectModel* model() const { return m_model.get(); } |
| 60 EffectModel* model() { return m_model.get(); } | 60 EffectModel* model() { return m_model.get(); } |
| 61 void setModel(EffectModel* model) { m_model = model; } | 61 void setModel(EffectModel* model) { m_model = model; } |
| 62 Priority getPriority() const { return m_priority; } | 62 Priority getPriority() const { return m_priority; } |
| 63 Element* target() const { return m_target; } | 63 Element* target() const { return m_target; } |
| 64 | 64 |
| 65 void notifySampledEffectRemovedFromEffectStack(); | 65 void notifySampledEffectRemovedFromEffectStack(); |
| 66 | 66 |
| 67 bool isCandidateForAnimationOnCompositor(double animationPlaybackRate) const; | 67 bool isCandidateForAnimationOnCompositor(double animationPlaybackRate) const; |
| 68 // Must only be called once. | 68 // Must only be called once. |
| 69 bool maybeStartAnimationOnCompositor(int group, | 69 bool maybeStartAnimationOnCompositor(int group, |
| 70 double startTime, | 70 double startTime, |
| 71 double timeOffset, | 71 double timeOffset, |
| 72 double animationPlaybackRate); | 72 double animationPlaybackRate); |
| 73 bool hasActiveAnimationsOnCompositor() const; | 73 bool hasActiveAnimationsOnCompositor() const; |
| 74 bool hasActiveAnimationsOnCompositor(CSSPropertyID) const; | 74 bool hasActiveAnimationsOnCompositor(const PropertyHandle&) const; |
| 75 bool cancelAnimationOnCompositor(); | 75 bool cancelAnimationOnCompositor(); |
| 76 void restartAnimationOnCompositor(); | 76 void restartAnimationOnCompositor(); |
| 77 void cancelIncompatibleAnimationsOnCompositor(); | 77 void cancelIncompatibleAnimationsOnCompositor(); |
| 78 void pauseAnimationForTestingOnCompositor(double pauseTime); | 78 void pauseAnimationForTestingOnCompositor(double pauseTime); |
| 79 | 79 |
| 80 void attachCompositedLayers(); | 80 void attachCompositedLayers(); |
| 81 | 81 |
| 82 void setCompositorAnimationIdsForTesting( | 82 void setCompositorAnimationIdsForTesting( |
| 83 const Vector<int>& compositorAnimationIds) { | 83 const Vector<int>& compositorAnimationIds) { |
| 84 m_compositorAnimationIds = compositorAnimationIds; | 84 m_compositorAnimationIds = compositorAnimationIds; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly, | 120 DEFINE_TYPE_CASTS(KeyframeEffectReadOnly, |
| 121 AnimationEffectReadOnly, | 121 AnimationEffectReadOnly, |
| 122 animationNode, | 122 animationNode, |
| 123 animationNode->isKeyframeEffectReadOnly(), | 123 animationNode->isKeyframeEffectReadOnly(), |
| 124 animationNode.isKeyframeEffectReadOnly()); | 124 animationNode.isKeyframeEffectReadOnly()); |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| 127 | 127 |
| 128 #endif // KeyframeEffectReadOnly_h | 128 #endif // KeyframeEffectReadOnly_h |
| OLD | NEW |