| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Keyframe_h | 5 #ifndef Keyframe_h |
| 6 #define Keyframe_h | 6 #define Keyframe_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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 const RefPtr<Keyframe>& b) { | 49 const RefPtr<Keyframe>& b) { |
| 50 return a->Offset() < b->Offset(); | 50 return a->Offset() < b->Offset(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual PropertyHandleSet Properties() const = 0; | 53 virtual PropertyHandleSet Properties() const = 0; |
| 54 | 54 |
| 55 virtual PassRefPtr<Keyframe> Clone() const = 0; | 55 virtual PassRefPtr<Keyframe> Clone() const = 0; |
| 56 PassRefPtr<Keyframe> CloneWithOffset(double offset) const { | 56 PassRefPtr<Keyframe> CloneWithOffset(double offset) const { |
| 57 RefPtr<Keyframe> the_clone = Clone(); | 57 RefPtr<Keyframe> the_clone = Clone(); |
| 58 the_clone->SetOffset(offset); | 58 the_clone->SetOffset(offset); |
| 59 return the_clone.Release(); | 59 return the_clone; |
| 60 } | 60 } |
| 61 | 61 |
| 62 virtual bool IsAnimatableValueKeyframe() const { return false; } | 62 virtual bool IsAnimatableValueKeyframe() const { return false; } |
| 63 virtual bool IsStringKeyframe() const { return false; } | 63 virtual bool IsStringKeyframe() const { return false; } |
| 64 virtual bool IsTransitionKeyframe() const { return false; } | 64 virtual bool IsTransitionKeyframe() const { return false; } |
| 65 | 65 |
| 66 // Represents a property-value pair in a keyframe. | 66 // Represents a property-value pair in a keyframe. |
| 67 class PropertySpecificKeyframe : public RefCounted<PropertySpecificKeyframe> { | 67 class PropertySpecificKeyframe : public RefCounted<PropertySpecificKeyframe> { |
| 68 USING_FAST_MALLOC(PropertySpecificKeyframe); | 68 USING_FAST_MALLOC(PropertySpecificKeyframe); |
| 69 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe); | 69 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 double offset_; | 131 double offset_; |
| 132 EffectModel::CompositeOperation composite_; | 132 EffectModel::CompositeOperation composite_; |
| 133 RefPtr<TimingFunction> easing_; | 133 RefPtr<TimingFunction> easing_; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; | 136 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; |
| 137 | 137 |
| 138 } // namespace blink | 138 } // namespace blink |
| 139 | 139 |
| 140 #endif // Keyframe_h | 140 #endif // Keyframe_h |
| OLD | NEW |