Preserve fLastMoveToIndex in SkPath::transform
This should remedy some of the SkPath::reverseAddPath fuzzer failures Change-Id: Ic9fe6106b4a0693084b75f0544b672cea78be3cc Reviewed-on: https://skia-review.googlesource.com/154625 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
7724d3f494
commit
f026d896dc
@ -1716,10 +1716,10 @@ SkPath& SkPath::reverseAddPath(const SkPath& srcPath) {
|
||||
src = tmp.set(srcPath);
|
||||
}
|
||||
|
||||
SkPathRef::Editor ed(&fPathRef, src->fPathRef->countPoints(), src->fPathRef->countVerbs());
|
||||
SkPathRef::Editor ed(&fPathRef, src->countVerbs(), src->countPoints());
|
||||
|
||||
const SkPoint* pts = src->fPathRef->pointsEnd();
|
||||
// we will iterator through src's verbs backwards
|
||||
// we will iterate through src's verbs backwards
|
||||
const uint8_t* verbs = src->fPathRef->verbsMemBegin(); // points at the last verb
|
||||
const uint8_t* verbsEnd = src->fPathRef->verbs(); // points just past the first verb
|
||||
const SkScalar* conicWeights = src->fPathRef->conicWeightsEnd();
|
||||
@ -1840,6 +1840,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
|
||||
SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix);
|
||||
|
||||
if (this != dst) {
|
||||
dst->fLastMoveToIndex = fLastMoveToIndex;
|
||||
dst->fFillType = fFillType;
|
||||
dst->fConvexity.store(fConvexity);
|
||||
dst->fIsVolatile = fIsVolatile;
|
||||
|
Loading…
Reference in New Issue
Block a user