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

Unified Diff: src/gpu/GrTessellatingPathRenderer.cpp

Issue 1095773003: Fix point count computation in tessellating path renderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index 601f8ea67f354e7a7abee9e24d60fb364d20baa5..c80b693ef5f061d34f8b558fffe1f30748ca3ef7 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -565,7 +565,7 @@ void path_to_contours(const SkPath& path, SkScalar tolerance, const SkRect& clip
SkScalar weight = iter.conicWeight();
const SkPoint* quadPts = converter.computeQuads(pts, weight, toleranceSqd);
for (int i = 0; i < converter.countQuads(); ++i) {
- int pointsLeft = GrPathUtils::quadraticPointCount(quadPts, toleranceSqd);
+ int pointsLeft = GrPathUtils::quadraticPointCount(quadPts, tolerance);
prev = generate_quadratic_points(quadPts[0], quadPts[1], quadPts[2],
toleranceSqd, prev, &head, pointsLeft, alloc);
quadPts += 2;
@@ -586,13 +586,13 @@ void path_to_contours(const SkPath& path, SkScalar tolerance, const SkRect& clip
break;
}
case SkPath::kQuad_Verb: {
- int pointsLeft = GrPathUtils::quadraticPointCount(pts, toleranceSqd);
+ int pointsLeft = GrPathUtils::quadraticPointCount(pts, tolerance);
prev = generate_quadratic_points(pts[0], pts[1], pts[2], toleranceSqd, prev,
&head, pointsLeft, alloc);
break;
}
case SkPath::kCubic_Verb: {
- int pointsLeft = GrPathUtils::cubicPointCount(pts, toleranceSqd);
+ int pointsLeft = GrPathUtils::cubicPointCount(pts, tolerance);
prev = generate_cubic_points(pts[0], pts[1], pts[2], pts[3],
toleranceSqd, prev, &head, pointsLeft, alloc);
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698