diff options
author | 2017-10-16 12:31:14 +0000 | |
---|---|---|
committer | 2017-10-16 12:53:14 +0000 | |
commit | d6365e5fb8746d31b564d757297197df5b02a3d0 (patch) | |
tree | 6a393d7f551bab3ce1d8227261caec422408fc82 /src/gpu/ccpr/GrCCPRCoverageOp.cpp | |
parent | 9ef6de782413a3b785ce12fb4b6ea782e72e8805 (diff) |
Revert "Refactor CCPR coverage shaders for a vertex impl"
This reverts commit e501033bbdc9143848edde3c3e3b7282169bc11e.
Reason for revert: Broke several bots
Original change's description:
> Refactor CCPR coverage shaders for a vertex impl
>
> Decouples geometry generation and analytic coverage. This paves the
> way for a vertex shader implementation.
>
> Bug: skia:
> Change-Id: I23b79d4397db22bd8fc063b8dfca58ab00037292
> Reviewed-on: https://skia-review.googlesource.com/59200
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I314bf03fa6cbeceb1c527d4d9464147b2e8464c6
Reviewed-on: https://skia-review.googlesource.com/59821
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'src/gpu/ccpr/GrCCPRCoverageOp.cpp')
-rw-r--r-- | src/gpu/ccpr/GrCCPRCoverageOp.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gpu/ccpr/GrCCPRCoverageOp.cpp b/src/gpu/ccpr/GrCCPRCoverageOp.cpp index 34e0410f9e..f37fcbef05 100644 --- a/src/gpu/ccpr/GrCCPRCoverageOp.cpp +++ b/src/gpu/ccpr/GrCCPRCoverageOp.cpp @@ -385,7 +385,7 @@ void GrCCPRCoverageOp::setBuffers(sk_sp<GrBuffer> pointsBuffer, sk_sp<GrBuffer> } void GrCCPRCoverageOp::onExecute(GrOpFlushState* flushState) { - using RenderPass = GrCCPRCoverageProcessor::RenderPass; + using Mode = GrCCPRCoverageProcessor::Mode; SkDEBUGCODE(GrCCPRCoverageProcessor::Validate(flushState->drawOpArgs().fProxy)); SkASSERT(fPointsBuffer); @@ -399,34 +399,34 @@ void GrCCPRCoverageOp::onExecute(GrOpFlushState* flushState) { // Triangles. auto constexpr kTrianglesGrPrimitiveType = GrCCPRCoverageProcessor::kTrianglesGrPrimitiveType; - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kTriangleHulls, + this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleHulls, kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kTriangleEdges, + this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleEdges, kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kTriangleCorners, + this->drawMaskPrimitives(flushState, pipeline, Mode::kTriangleCorners, kTrianglesGrPrimitiveType, 3, &PrimitiveTallies::fTriangles); // Quadratics. auto constexpr kQuadraticsGrPrimitiveType = GrCCPRCoverageProcessor::kQuadraticsGrPrimitiveType; - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kQuadraticHulls, + this->drawMaskPrimitives(flushState, pipeline, Mode::kQuadraticHulls, kQuadraticsGrPrimitiveType, 3, &PrimitiveTallies::fQuadratics); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kQuadraticCorners, + this->drawMaskPrimitives(flushState, pipeline, Mode::kQuadraticCorners, kQuadraticsGrPrimitiveType, 3, &PrimitiveTallies::fQuadratics); // Cubics. auto constexpr kCubicsGrPrimitiveType = GrCCPRCoverageProcessor::kCubicsGrPrimitiveType; - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kSerpentineHulls, + this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineHulls, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fSerpentines); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kLoopHulls, + this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopHulls, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fLoops); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kSerpentineCorners, + this->drawMaskPrimitives(flushState, pipeline, Mode::kSerpentineCorners, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fSerpentines); - this->drawMaskPrimitives(flushState, pipeline, RenderPass::kLoopCorners, + this->drawMaskPrimitives(flushState, pipeline, Mode::kLoopCorners, kCubicsGrPrimitiveType, 4, &PrimitiveTallies::fLoops); } void GrCCPRCoverageOp::drawMaskPrimitives(GrOpFlushState* flushState, const GrPipeline& pipeline, - GrCCPRCoverageProcessor::RenderPass renderPass, + GrCCPRCoverageProcessor::Mode mode, GrPrimitiveType primType, int vertexCount, int PrimitiveTallies::* instanceType) const { using ScissorMode = GrCCPRCoverageOpsBuilder::ScissorMode; @@ -463,7 +463,7 @@ void GrCCPRCoverageOp::drawMaskPrimitives(GrOpFlushState* flushState, const GrPi SkASSERT(fMeshesScratchBuffer.count() == fDynamicStatesScratchBuffer.count()); if (!fMeshesScratchBuffer.empty()) { - GrCCPRCoverageProcessor proc(renderPass, fPointsBuffer.get()); + GrCCPRCoverageProcessor proc(mode, fPointsBuffer.get()); SkASSERT(flushState->rtCommandBuffer()); flushState->rtCommandBuffer()->draw(pipeline, proc, fMeshesScratchBuffer.begin(), fDynamicStatesScratchBuffer.begin(), |