| 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 "core/style/DataEquivalency.h" | 7 #include "core/style/DataEquivalency.h" |
| 8 #include "core/svg/SVGPathBlender.h" | 8 #include "core/svg/SVGPathBlender.h" |
| 9 #include "core/svg/SVGPathByteStreamBuilder.h" | 9 #include "core/svg/SVGPathByteStreamBuilder.h" |
| 10 #include "core/svg/SVGPathByteStreamSource.h" | 10 #include "core/svg/SVGPathByteStreamSource.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); | 46 OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); |
| 47 SVGPathByteStreamBuilder builder(*byteStream); | 47 SVGPathByteStreamBuilder builder(*byteStream); |
| 48 | 48 |
| 49 SVGPathByteStreamSource fromSource(path()->byteStream()); | 49 SVGPathByteStreamSource fromSource(path()->byteStream()); |
| 50 SVGPathByteStreamSource toSource(toAnimatablePath(value)->path()->byteStream
()); | 50 SVGPathByteStreamSource toSource(toAnimatablePath(value)->path()->byteStream
()); |
| 51 | 51 |
| 52 SVGPathBlender blender(&fromSource, &toSource, &builder); | 52 SVGPathBlender blender(&fromSource, &toSource, &builder); |
| 53 bool ok = blender.blendAnimatedPath(fraction); | 53 bool ok = blender.blendAnimatedPath(fraction); |
| 54 ASSERT_UNUSED(ok, ok); | 54 ASSERT_UNUSED(ok, ok); |
| 55 return AnimatablePath::create(StylePath::create(byteStream.release())); | 55 return AnimatablePath::create(StylePath::create(std::move(byteStream))); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool AnimatablePath::equalTo(const AnimatableValue* value) const | 58 bool AnimatablePath::equalTo(const AnimatableValue* value) const |
| 59 { | 59 { |
| 60 return dataEquivalent(m_path.get(), toAnimatablePath(value)->path()); | 60 return dataEquivalent(m_path.get(), toAnimatablePath(value)->path()); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |