Increase QuadEdge precision on all platforms
Bug: skia:10594
Change-Id: I853f05f12c0a3b8e25948c51c11fa9bd01cc67f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343422
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 3a893cc..c165e06 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -568,12 +568,9 @@
// emit attributes
varyingHandler->emitAttributes(qe);
-#if defined(SK_BUILD_FOR_IOS)
// GL on iOS 14 needs more precision for the quadedge attributes
+ // We might as well enable it everywhere
GrGLSLVarying v(kFloat4_GrSLType);
-#else
- GrGLSLVarying v(kHalf4_GrSLType);
-#endif
varyingHandler->addVarying("QuadEdge", &v);
vertBuilder->codeAppendf("%s = %s;", v.vsOut(), qe.fInQuadEdge.name());
@@ -650,12 +647,8 @@
, fUsesLocalCoords(usesLocalCoords) {
fInPosition = {"inPosition", kFloat2_GrVertexAttribType, kFloat2_GrSLType};
fInColor = MakeColorAttribute("inColor", wideColor);
-#if defined(SK_BUILD_FOR_IOS)
// GL on iOS 14 needs more precision for the quadedge attributes
fInQuadEdge = {"inQuadEdge", kFloat4_GrVertexAttribType, kFloat4_GrSLType};
-#else
- fInQuadEdge = {"inQuadEdge", kFloat4_GrVertexAttribType, kHalf4_GrSLType};
-#endif
this->setVertexAttributes(&fInPosition, 3);
}