OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/animatable/AnimatablePath.h" | 5 #include "core/animation/animatable/AnimatablePath.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/style/DataEquivalency.h" | 8 #include "core/style/DataEquivalency.h" |
8 #include "core/svg/SVGPathBlender.h" | 9 #include "core/svg/SVGPathBlender.h" |
9 #include "core/svg/SVGPathByteStreamBuilder.h" | 10 #include "core/svg/SVGPathByteStreamBuilder.h" |
10 #include "core/svg/SVGPathByteStreamSource.h" | 11 #include "core/svg/SVGPathByteStreamSource.h" |
11 #include <memory> | |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 bool AnimatablePath::usesDefaultInterpolationWith( | 15 bool AnimatablePath::usesDefaultInterpolationWith( |
16 const AnimatableValue* value) const { | 16 const AnimatableValue* value) const { |
17 // Default interpolation is used if the paths have different lengths, | 17 // Default interpolation is used if the paths have different lengths, |
18 // or the paths have a segment with different types (ignoring "relativeness"). | 18 // or the paths have a segment with different types (ignoring "relativeness"). |
19 | 19 |
20 const StylePath* toPath = toAnimatablePath(value)->path(); | 20 const StylePath* toPath = toAnimatablePath(value)->path(); |
21 if (!m_path || !toPath) | 21 if (!m_path || !toPath) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 bool ok = blender.blendAnimatedPath(fraction); | 57 bool ok = blender.blendAnimatedPath(fraction); |
58 ALLOW_UNUSED_LOCAL(ok); | 58 ALLOW_UNUSED_LOCAL(ok); |
59 return AnimatablePath::create(StylePath::create(std::move(byteStream))); | 59 return AnimatablePath::create(StylePath::create(std::move(byteStream))); |
60 } | 60 } |
61 | 61 |
62 bool AnimatablePath::equalTo(const AnimatableValue* value) const { | 62 bool AnimatablePath::equalTo(const AnimatableValue* value) const { |
63 return dataEquivalent(m_path.get(), toAnimatablePath(value)->path()); | 63 return dataEquivalent(m_path.get(), toAnimatablePath(value)->path()); |
64 } | 64 } |
65 | 65 |
66 } // namespace blink | 66 } // namespace blink |
OLD | NEW |