GrTessellator: eliminate some redundant computation.
No need to recompute the bisector when mitering. Change-Id: If7b99244d530d4b2241b7b45611f9401b2f02d69 Reviewed-on: https://skia-review.googlesource.com/93673 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
cff9ab7d98
commit
4f34fca3eb
@ -1996,12 +1996,11 @@ void stroke_boundary(EdgeList* boundary, VertexList* innerMesh, VertexList* oute
|
||||
prevV->fPoint + SkVector::Make(prevOuter.fA, prevOuter.fB));
|
||||
Line nextTangent(nextV->fPoint,
|
||||
nextV->fPoint + SkVector::Make(outer.fA, outer.fB));
|
||||
Line b(innerPoint, outerPoint);
|
||||
if (prevTangent.dist(outerPoint) > 0) {
|
||||
b.intersect(prevTangent, &outerPoint);
|
||||
bisector.intersect(prevTangent, &outerPoint);
|
||||
}
|
||||
if (nextTangent.dist(outerPoint) < 0) {
|
||||
b.intersect(nextTangent, &outerPoint);
|
||||
bisector.intersect(nextTangent, &outerPoint);
|
||||
}
|
||||
outerPoint1 = outerPoint2 = outerPoint;
|
||||
} else {
|
||||
@ -2014,12 +2013,11 @@ void stroke_boundary(EdgeList* boundary, VertexList* innerMesh, VertexList* oute
|
||||
prevV->fPoint + SkVector::Make(prevInner.fA, prevInner.fB));
|
||||
Line nextTangent(nextV->fPoint,
|
||||
nextV->fPoint + SkVector::Make(inner.fA, inner.fB));
|
||||
Line b(innerPoint, outerPoint);
|
||||
if (prevTangent.dist(innerPoint) > 0) {
|
||||
b.intersect(prevTangent, &innerPoint);
|
||||
bisector.intersect(prevTangent, &innerPoint);
|
||||
}
|
||||
if (nextTangent.dist(innerPoint) < 0) {
|
||||
b.intersect(nextTangent, &innerPoint);
|
||||
bisector.intersect(nextTangent, &innerPoint);
|
||||
}
|
||||
innerPoint1 = innerPoint2 = innerPoint;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user