Remove global curve subdivision tolerance from GrPathUtils.
Put in framework for changing curve subdivision tolerance when rendering
offscreen AA tiles; however, comment out actual tolerance changes because
of possible quality issues with simple circles (q.v. Arcs slide of SampleApp).
git-svn-id: http://skia.googlecode.com/svn/trunk@1702 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrPathRenderer.cpp b/gpu/src/GrPathRenderer.cpp
index 58bb12e..1795bd4 100644
--- a/gpu/src/GrPathRenderer.cpp
+++ b/gpu/src/GrPathRenderer.cpp
@@ -6,10 +6,15 @@
#include "GrMemory.h"
#include "GrTexture.h"
+GrPathRenderer::GrPathRenderer()
+ : fCurveTolerance (GR_Scalar1) {
+
+}
+
GrDefaultPathRenderer::GrDefaultPathRenderer(bool separateStencilSupport,
bool stencilWrapOpsSupport)
- : fSeparateStencil(separateStencilSupport),
- fStencilWrapOps(stencilWrapOpsSupport) {
+ : fSeparateStencil(separateStencilSupport)
+ , fStencilWrapOps(stencilWrapOpsSupport) {
}
@@ -197,7 +202,7 @@
// stretch when mapping to screen coordinates.
GrScalar stretch = viewM.getMaxStretch();
bool useStretch = stretch > 0;
- GrScalar tol = GrPathUtils::gTolerance;
+ GrScalar tol = fCurveTolerance;
if (!useStretch) {
// TODO: deal with perspective in some better way.