aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr/GrCCPRGeometry.cpp
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-12-08 10:59:58 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-08 20:13:18 +0000
commitbe4ffab4e208ec47b4298621b9c9e8456f31717e (patch)
tree28bee87fec500acab63c2e72c77a6b7a4fd53ba1 /src/gpu/ccpr/GrCCPRGeometry.cpp
parent3f39bf8fe596f87120d189dbec2889b644f07e2d (diff)
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>
Diffstat (limited to 'src/gpu/ccpr/GrCCPRGeometry.cpp')
-rw-r--r--src/gpu/ccpr/GrCCPRGeometry.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gpu/ccpr/GrCCPRGeometry.cpp b/src/gpu/ccpr/GrCCPRGeometry.cpp
index d6423effa3..f73cd55962 100644
--- a/src/gpu/ccpr/GrCCPRGeometry.cpp
+++ b/src/gpu/ccpr/GrCCPRGeometry.cpp
@@ -30,7 +30,7 @@ void GrCCPRGeometry::beginContour(const SkPoint& devPt) {
// 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 @@ void GrCCPRGeometry::appendMonotonicCubics(const Sk2f& p0, const Sk2f& p1, const
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,