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

Unified Diff: src/gpu/GrPathUtils.h

Issue 1694403003: Modify interface to GrPathUtils::convertCubicToQuads (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: whitespace Created 4 years, 10 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 | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathUtils.h
diff --git a/src/gpu/GrPathUtils.h b/src/gpu/GrPathUtils.h
index 4874fa2aef08bda026b0c557dc170a14ce9e5c89..cb2da30803ed9d94e9a11dd401e2b37998afb4b1 100644
--- a/src/gpu/GrPathUtils.h
+++ b/src/gpu/GrPathUtils.h
@@ -108,21 +108,22 @@ namespace GrPathUtils {
// Converts a cubic into a sequence of quads. If working in device space
// use tolScale = 1, otherwise set based on stretchiness of the matrix. The
- // result is sets of 3 points in quads (TODO: share endpoints in returned
- // array)
+ // result is sets of 3 points in quads.
+ void convertCubicToQuads(const SkPoint p[4],
+ SkScalar tolScale,
+ SkTArray<SkPoint, true>* quads);
+
// When we approximate a cubic {a,b,c,d} with a quadratic we may have to
// ensure that the new control point lies between the lines ab and cd. The
// convex path renderer requires this. It starts with a path where all the
// control points taken together form a convex polygon. It relies on this
// property and the quadratic approximation of cubics step cannot alter it.
- // Setting constrainWithinTangents to true enforces this property. When this
- // is true the cubic must be simple and dir must specify the orientation of
- // the cubic. Otherwise, dir is ignored.
- void convertCubicToQuads(const SkPoint p[4],
- SkScalar tolScale,
- bool constrainWithinTangents,
- SkPathPriv::FirstDirection dir,
- SkTArray<SkPoint, true>* quads);
+ // This variation enforces this constraint. The cubic must be simple and dir
+ // must specify the orientation of the contour containing the cubic.
+ void convertCubicToQuadsConstrainToTangents(const SkPoint p[4],
+ SkScalar tolScale,
+ SkPathPriv::FirstDirection dir,
+ SkTArray<SkPoint, true>* quads);
// Chops the cubic bezier passed in by src, at the double point (intersection point)
// if the curve is a cubic loop. If it is a loop, there will be two parametric values for
« no previous file with comments | « no previous file | src/gpu/GrPathUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698