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

Unified Diff: src/gpu/GrAAConvexPathRenderer.cpp

Issue 1209003004: Revert of Revert of added stroking support to GrAALinearizingConvexPathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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/core/SkPathPriv.h ('k') | src/gpu/GrAAConvexTessellator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 4e3d859e0ba568e125c72b2c650a412444455fd1..52994758c019dfaeb5dea5ea7fb8450bbfd73612 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -707,16 +707,15 @@
// 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);
}
}
« no previous file with comments | « src/core/SkPathPriv.h ('k') | src/gpu/GrAAConvexTessellator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698