Index: src/gpu/GrAAConvexPathRenderer.cpp |
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp |
index 45a4ca37831532d86f42b9f5507d934fe4222c0d..5a789bc6814be8881e4fcd3c3d49e5c8be901790 100644 |
--- a/src/gpu/GrAAConvexPathRenderer.cpp |
+++ b/src/gpu/GrAAConvexPathRenderer.cpp |
@@ -708,16 +708,15 @@ static void extract_verts(const GrAAConvexTessellator& tess, |
// Make 'verts' point to the colors |
verts += sizeof(SkPoint); |
for (int i = 0; i < tess.numPts(); ++i) { |
- SkASSERT(tess.depth(i) >= -0.5f && tess.depth(i) <= 0.5f); |
if (tweakAlphaForCoverage) { |
- SkASSERT(SkScalarRoundToInt(255.0f * (tess.depth(i) + 0.5f)) <= 255); |
- unsigned scale = SkScalarRoundToInt(255.0f * (tess.depth(i) + 0.5f)); |
+ SkASSERT(SkScalarRoundToInt(255.0f * tess.coverage(i)) <= 255); |
+ unsigned scale = SkScalarRoundToInt(255.0f * tess.coverage(i)); |
GrColor scaledColor = (0xff == scale) ? color : SkAlphaMulQ(color, scale); |
*reinterpret_cast<GrColor*>(verts + i * vertexStride) = scaledColor; |
} else { |
*reinterpret_cast<GrColor*>(verts + i * vertexStride) = color; |
*reinterpret_cast<float*>(verts + i * vertexStride + sizeof(GrColor)) = |
- tess.depth(i) + 0.5f; |
+ tess.coverage(i); |
} |
} |