CCPR: Combine loops and serpentines back into a single shader
Bug: skia:
Change-Id: I945471ccd2580a2d39afd9c80acb8d9e5e196435
Reviewed-on: https://skia-review.googlesource.com/82460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/ccpr/GrCCPRGeometry.cpp b/src/gpu/ccpr/GrCCPRGeometry.cpp
index d6423ef..f73cd55 100644
--- a/src/gpu/ccpr/GrCCPRGeometry.cpp
+++ b/src/gpu/ccpr/GrCCPRGeometry.cpp
@@ -30,7 +30,7 @@
// Store the current verb count in the fTriangles field for now. When we close the contour we
// will use this value to calculate the actual number of triangles in its fan.
- fCurrContourTallies = {fVerbs.count(), 0, 0, 0};
+ fCurrContourTallies = {fVerbs.count(), 0, 0};
fPoints.push_back(devPt);
fVerbs.push_back(Verb::kBeginContour);
@@ -538,13 +538,8 @@
p1.store(&fPoints.push_back());
p2.store(&fPoints.push_back());
p3.store(&fPoints.push_back());
- if (SkCubicType::kLoop != fCurrCubicType) {
- fVerbs.push_back(Verb::kMonotonicSerpentineTo);
- ++fCurrContourTallies.fSerpentines;
- } else {
- fVerbs.push_back(Verb::kMonotonicLoopTo);
- ++fCurrContourTallies.fLoops;
- }
+ fVerbs.push_back(Verb::kMonotonicCubicTo);
+ ++fCurrContourTallies.fCubics;
}
void GrCCPRGeometry::appendCubicApproximation(const Sk2f& p0, const Sk2f& p1, const Sk2f& p2,