Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Side by Side Diff: third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp

Issue 1460253002: SVGPath object "mutability" cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; byteStreamWillChange->byteStreamChanged; Drop some includes. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPath.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "core/animation/PathSVGInterpolation.h" 6 #include "core/animation/PathSVGInterpolation.h"
7 7
8 #include "core/svg/SVGPathByteStreamBuilder.h" 8 #include "core/svg/SVGPathByteStreamBuilder.h"
9 #include "core/svg/SVGPathByteStreamSource.h" 9 #include "core/svg/SVGPathByteStreamSource.h"
10 #include "core/svg/SVGPathElement.h" 10 #include "core/svg/SVGPathElement.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 ++i; 426 ++i;
427 } 427 }
428 ASSERT(!endPathSource.hasMoreData()); 428 ASSERT(!endPathSource.hasMoreData());
429 ASSERT(i == length); 429 ASSERT(i == length);
430 430
431 return adoptRef(new PathSVGInterpolation(startValue.release(), endValue.rele ase(), attribute, pathSegTypes)); 431 return adoptRef(new PathSVGInterpolation(startValue.release(), endValue.rele ase(), attribute, pathSegTypes));
432 } 432 }
433 433
434 PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::fromInterpolableVa lue(const InterpolableValue& value, const Vector<SVGPathSegType>& pathSegTypes) 434 PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::fromInterpolableVa lue(const InterpolableValue& value, const Vector<SVGPathSegType>& pathSegTypes)
435 { 435 {
436 RefPtrWillBeRawPtr<SVGPath> result = SVGPath::create(); 436 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
437 InterpolatedPathSource source(toInterpolableList(value), pathSegTypes); 437 InterpolatedPathSource source(toInterpolableList(value), pathSegTypes);
438 SVGPathByteStreamBuilder builder(result->mutableByteStream()); 438 SVGPathByteStreamBuilder builder(*pathByteStream);
439 SVGPathParser parser(&source, &builder); 439 SVGPathParser parser(&source, &builder);
440 parser.parsePathDataFromSource(UnalteredParsing, false); 440 parser.parsePathDataFromSource(UnalteredParsing, false);
441 return result.release(); 441 return SVGPath::create(pathByteStream.release());
442 } 442 }
443 443
444 PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::interpolatedValue( SVGElement&) const 444 PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::interpolatedValue( SVGElement&) const
445 { 445 {
446 return fromInterpolableValue(*m_cachedValue, m_pathSegTypes); 446 return fromInterpolableValue(*m_cachedValue, m_pathSegTypes);
447 } 447 }
448 448
449 } 449 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698