diff options
author | Brian Salomon <bsalomon@google.com> | 2018-07-02 09:00:27 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-02 13:46:30 +0000 |
commit | a219419c9d76432dca74494b611ff1f59086d139 (patch) | |
tree | e6e5d964b27c4d4656ed1e912700796ad1fff441 /src/gpu/GrPipeline.h | |
parent | 00d2e8ebcb13c388339ff1cfbd202fff9589e77a (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/GrPipeline.h')
-rw-r--r-- | src/gpu/GrPipeline.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h index f60a6d410b..23255287ae 100644 --- a/src/gpu/GrPipeline.h +++ b/src/gpu/GrPipeline.h @@ -64,11 +64,6 @@ public: return flags; } - enum ScissorState : bool { - kEnabled = true, - kDisabled = false - }; - struct InitArgs { uint32_t fFlags = 0; const GrUserStencilSettings* fUserStencil = &GrUserStencilSettings::kUnused; @@ -103,7 +98,7 @@ public: * must be "Porter Duff" (<= kLastCoeffMode). If using ScissorState::kEnabled, the caller must * specify a scissor rectangle through the DynamicState struct. **/ - GrPipeline(GrRenderTargetProxy*, ScissorState, SkBlendMode); + GrPipeline(GrRenderTargetProxy*, GrScissorTest, SkBlendMode); GrPipeline(const InitArgs&, GrProcessorSet&&, GrAppliedClip&&); @@ -179,8 +174,8 @@ public: const GrUserStencilSettings* getUserStencil() const { return fUserStencilSettings; } - ScissorState isScissorEnabled() const { - return ScissorState(SkToBool(fFlags & kScissorEnabled_Flag)); + GrScissorTest scissorTest() const { + return GrScissorTest(SkToBool(fFlags & kScissorEnabled_Flag)); } const GrWindowRectsState& getWindowRectsState() const { return fWindowRectsState; } |