diff options
author | Brian Salomon <bsalomon@google.com> | 2018-07-02 14:08:49 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-02 14:09:01 +0000 |
commit | d818ebf4a31724aa93fd439a2ac4195f69ae3af0 (patch) | |
tree | 28b49c892741fe114f6d99a1f2fb15fac3251133 /src/gpu/GrFixedClip.cpp | |
parent | 068025e39ca5131b598805d5f1513cc18ae15dea (diff) |
Revert "Some scissor state cleanup."
This reverts commit a219419c9d76432dca74494b611ff1f59086d139.
Reason for revert: breaking things
Original change's description:
> 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>
TBR=bsalomon@google.com,csmartdalton@google.com
Change-Id: If71a5c5efc86d4239b40675bad2a6cb1f77460f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138900
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrFixedClip.cpp')
-rw-r--r-- | src/gpu/GrFixedClip.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/GrFixedClip.cpp b/src/gpu/GrFixedClip.cpp index 7eee3941f2..94a89fd034 100644 --- a/src/gpu/GrFixedClip.cpp +++ b/src/gpu/GrFixedClip.cpp @@ -14,13 +14,12 @@ bool GrFixedClip::quickContains(const SkRect& rect) const { if (fWindowRectsState.enabled()) { return false; } - return fScissorState.scissorTest() == GrScissorTest::kDisabled || - GrClip::IsInsideClip(fScissorState.rect(), rect); + return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect(), rect); } void GrFixedClip::getConservativeBounds(int w, int h, SkIRect* devResult, bool* iior) const { devResult->setXYWH(0, 0, w, h); - if (fScissorState.scissorTest() == GrScissorTest::kEnabled) { + if (fScissorState.enabled()) { if (!devResult->intersect(fScissorState.rect())) { devResult->setEmpty(); } @@ -34,7 +33,7 @@ bool GrFixedClip::isRRect(const SkRect& rtBounds, SkRRect* rr, GrAA* aa) const { if (fWindowRectsState.enabled()) { return false; } - if (fScissorState.scissorTest() == GrScissorTest::kEnabled) { + if (fScissorState.enabled()) { SkRect rect = SkRect::Make(fScissorState.rect()); if (!rect.intersects(rtBounds)) { return false; @@ -47,7 +46,7 @@ bool GrFixedClip::isRRect(const SkRect& rtBounds, SkRRect* rr, GrAA* aa) const { }; bool GrFixedClip::apply(int rtWidth, int rtHeight, GrAppliedHardClip* out, SkRect* bounds) const { - if (fScissorState.scissorTest() == GrScissorTest::kEnabled) { + if (fScissorState.enabled()) { SkIRect tightScissor = SkIRect::MakeWH(rtWidth, rtHeight); if (!tightScissor.intersect(fScissorState.rect())) { return false; |