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 #include "core/animation/Keyframe.h" | 5 #include "core/animation/Keyframe.h" |
6 | 6 |
7 #include "core/animation/InvalidatableInterpolation.h" | 7 #include "core/animation/InvalidatableInterpolation.h" |
8 #include "core/animation/PropertyInterpolationTypesMapping.h" | |
9 | 8 |
10 namespace blink { | 9 namespace blink { |
11 | 10 |
12 PassRefPtr<Interpolation> | 11 PassRefPtr<Interpolation> |
13 Keyframe::PropertySpecificKeyframe::createInterpolation( | 12 Keyframe::PropertySpecificKeyframe::createInterpolation( |
14 PropertyHandle propertyHandle, | 13 PropertyHandle propertyHandle, |
15 const Keyframe::PropertySpecificKeyframe& end) const { | 14 const Keyframe::PropertySpecificKeyframe& end) const { |
16 // const_cast to take refs. | 15 // const_cast to take refs. |
17 return InvalidatableInterpolation::create( | 16 return InvalidatableInterpolation::create( |
18 propertyHandle, PropertyInterpolationTypesMapping::get(propertyHandle), | 17 propertyHandle, const_cast<PropertySpecificKeyframe*>(this), |
19 const_cast<PropertySpecificKeyframe*>(this), | |
20 const_cast<PropertySpecificKeyframe*>(&end)); | 18 const_cast<PropertySpecificKeyframe*>(&end)); |
21 } | 19 } |
22 | 20 |
23 } // namespace blink | 21 } // namespace blink |
OLD | NEW |