diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-09-05 16:46:48 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-05 23:06:42 +0000 |
commit | 7f578bf07b016778e3105b7655a895728b12d847 (patch) | |
tree | 5bdc64da012a72147750dfe20f0887b388944d49 /src/gpu/ccpr/GrCCPRCoverageOp.cpp | |
parent | c1e59638b4a08f5210f72f671292b1b3759f54c6 (diff) |
CCPR: Remove cubic insets and MSAA borders
Avoids the need for MSAA cubic borders by chopping up the cubic
geometry and crossing the inflections points and loop intersections
with lines and quadratic(s) instead. This allows us to render the
remaining cubic segments with simple hulls and analytic AA, giving
better image quality and performance.
Bug: skia:
Change-Id: If371229f575ee0286c325c230a116d602a9d38ce
Reviewed-on: https://skia-review.googlesource.com/41883
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCPRCoverageOp.cpp')
-rw-r--r-- | src/gpu/ccpr/GrCCPRCoverageOp.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/ccpr/GrCCPRCoverageOp.cpp b/src/gpu/ccpr/GrCCPRCoverageOp.cpp index c63b494268..a923726713 100644 --- a/src/gpu/ccpr/GrCCPRCoverageOp.cpp +++ b/src/gpu/ccpr/GrCCPRCoverageOp.cpp @@ -314,13 +314,13 @@ bool GrCCPRCoverageOpsBuilder::finalize(GrOnFlushResourceProvider* onFlushRP, currFan.push_back(ptsIdx += 2); continue; - case GrCCPRGeometry::Verb::kConvexSerpentineTo: + case GrCCPRGeometry::Verb::kMonotonicSerpentineTo: SkASSERT(!currFan.empty()); curveInstanceData[currIndices->fSerpentines++] = {ptsIdx, packedAtlasOffset}; currFan.push_back(ptsIdx += 3); continue; - case GrCCPRGeometry::Verb::kConvexLoopTo: + case GrCCPRGeometry::Verb::kMonotonicLoopTo: SkASSERT(!currFan.empty()); curveInstanceData[currIndices->fLoops++] = {ptsIdx, packedAtlasOffset}; currFan.push_back(ptsIdx += 3); @@ -410,13 +410,13 @@ void GrCCPRCoverageOp::onExecute(GrOpFlushState* flushState) { // Cubics. auto constexpr kCubicsGrPrimitiveType = GrCCPRCoverageProcessor::kCubicsGrPrimitiveType; - this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineInsets, + this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineHulls, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fSerpentines); - this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopInsets, + this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopHulls, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fLoops); - this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineBorders, + this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineCorners, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fSerpentines); - this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopBorders, + this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopCorners, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fLoops); } |