aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/ccpr
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-07-02 09:00:27 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-02 13:46:30 +0000
commita219419c9d76432dca74494b611ff1f59086d139 (patch)
treee6e5d964b27c4d4656ed1e912700796ad1fff441 /src/gpu/ccpr
parent00d2e8ebcb13c388339ff1cfbd202fff9589e77a (diff)
Some scissor state cleanup.
Separate flushing the enablement of scissor from the rect in GrGLGpu. Move GrPipeline::ScissorState to a global enum and use more broadly. Rename to GrScissorTest to avoid name conflict with existing GrScissorState. Change-Id: Ib32160b3300bc12de2d2e1761d152fd1bba8b683 Reviewed-on: https://skia-review.googlesource.com/137395 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/ccpr')
-rw-r--r--src/gpu/ccpr/GrCCPathParser.cpp4
-rw-r--r--src/gpu/ccpr/GrCCPerFlushResources.cpp3
2 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/ccpr/GrCCPathParser.cpp b/src/gpu/ccpr/GrCCPathParser.cpp
index 1935385eeb..d013b5766e 100644
--- a/src/gpu/ccpr/GrCCPathParser.cpp
+++ b/src/gpu/ccpr/GrCCPathParser.cpp
@@ -530,7 +530,7 @@ void GrCCPathParser::drawCoverageCount(GrOpFlushState* flushState, CoverageCount
const PrimitiveTallies& batchTotalCounts = fCoverageCountBatches[batchID].fTotalPrimitiveCounts;
- GrPipeline pipeline(flushState->drawOpArgs().fProxy, GrPipeline::ScissorState::kEnabled,
+ GrPipeline pipeline(flushState->drawOpArgs().fProxy, GrScissorTest::kEnabled,
SkBlendMode::kPlus);
if (batchTotalCounts.fTriangles) {
@@ -564,7 +564,7 @@ void GrCCPathParser::drawPrimitives(GrOpFlushState* flushState, const GrPipeline
GrCCCoverageProcessor::PrimitiveType primitiveType,
int PrimitiveTallies::*instanceType,
const SkIRect& drawBounds) const {
- SkASSERT(pipeline.isScissorEnabled());
+ SkASSERT(pipeline.scissorTest() == GrScissorTest::kEnabled);
// Don't call reset(), as that also resets the reserve count.
fMeshesScratchBuffer.pop_back_n(fMeshesScratchBuffer.count());
diff --git a/src/gpu/ccpr/GrCCPerFlushResources.cpp b/src/gpu/ccpr/GrCCPerFlushResources.cpp
index dd0bf1b473..c4e2861b47 100644
--- a/src/gpu/ccpr/GrCCPerFlushResources.cpp
+++ b/src/gpu/ccpr/GrCCPerFlushResources.cpp
@@ -64,8 +64,7 @@ public:
void onExecute(GrOpFlushState* flushState) override {
SkASSERT(fStashedAtlasProxy);
- GrPipeline pipeline(flushState->proxy(), GrPipeline::ScissorState::kDisabled,
- SkBlendMode::kSrc);
+ GrPipeline pipeline(flushState->proxy(), GrScissorTest::kDisabled, SkBlendMode::kSrc);
GrCCPathProcessor pathProc(flushState->resourceProvider(), std::move(fStashedAtlasProxy));
pathProc.drawPaths(flushState, pipeline, nullptr, *fResources, fBaseInstance, fEndInstance,
this->bounds());