aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2018-01-11 16:14:04 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-12 19:20:53 +0000
commit4f34fca3eb7b8551d3b0ec19217afb1437658d2c (patch)
tree38681afd13020aa5ee7b510ef078ec09d6410cd4 /src
parentcff9ab7d9804804f0805b59ca5712f70b2d93bb2 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrTessellator.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index 888c7de445..2974cf02db 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -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;
}