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

Unified Diff: src/gpu/GrPathUtils.h

Issue 1072273007: Improve the curve tessellation subdivision of the path renderers. (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 | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrTessellatingPathRenderer.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 c15fd7ae103237f8a4ecfda44d9fbf95dcd47e64..250b0a23245a2b81c22e73fb6e97e70ae0333b19 100644
--- a/src/gpu/GrPathUtils.h
+++ b/src/gpu/GrPathUtils.h
@@ -168,5 +168,12 @@ namespace GrPathUtils {
// If you transform the points the lines will also need to be transformed. This can be done
// by mapping the lines with the inverse-transpose of the matrix used to map the points.
void getCubicKLM(const SkPoint p[4], SkScalar klm[9]);
+
+ // When tessellating curved paths into linear segments, this defines the maximum distance
+ // in screen space which a segment may deviate from the mathmatically correct value.
+ // Above this value, the segment will be subdivided.
+ // This value was chosen to approximate the supersampling accuracy of the raster path (16
+ // samples, or one quarter pixel).
+ static const SkScalar kDefaultTolerance = SkDoubleToScalar(0.25);
};
#endif
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698