aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAppliedClip.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-07-09 18:23:58 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-09 18:24:08 +0000
commitc3833b4c152af3b6fa2a4c4ba7b1da02acd1af80 (patch)
tree87183da161e40d0b2fb86fdbe12a8570bfb54d40 /src/gpu/GrAppliedClip.h
parentd48897b576e9ee7df445606243d14bcb1d0b95df (diff)
Revert "Add genIDs from all contributing elements to GrReducedClip's mask key."
This reverts commit 1354048c8fa885b83e414532c011d710590d6b46. Reason for revert: tsan/valgrind failures Original change's description: > Add genIDs from all contributing elements to GrReducedClip's mask key. > > Change-Id: I3fed124ba3fefd1ef82acdb4ace9531d0c89ad8b > Reviewed-on: https://skia-review.googlesource.com/138586 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com Change-Id: Ia5bc098309cd02baf46f03d8ff17fabbd383481e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/139920 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrAppliedClip.h')
-rw-r--r--src/gpu/GrAppliedClip.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gpu/GrAppliedClip.h b/src/gpu/GrAppliedClip.h
index eb136eaccb..bfe3383e16 100644
--- a/src/gpu/GrAppliedClip.h
+++ b/src/gpu/GrAppliedClip.h
@@ -27,7 +27,8 @@ public:
const GrScissorState& scissorState() const { return fScissorState; }
const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; }
- bool hasStencilClip() const { return fHasStencilClip; }
+ uint32_t stencilStackID() const { return fStencilStackID; }
+ bool hasStencilClip() const { return SkClipStack::kInvalidGenID != fStencilStackID; }
/**
* Intersects the applied clip with the provided rect. Returns false if the draw became empty.
@@ -48,9 +49,9 @@ public:
fWindowRectsState.set(windows, mode);
}
- void addStencilClip() {
- SkASSERT(!fHasStencilClip);
- fHasStencilClip = true;
+ void addStencilClip(uint32_t stencilStackID) {
+ SkASSERT(SkClipStack::kInvalidGenID == fStencilStackID);
+ fStencilStackID = stencilStackID;
}
bool doesClip() const {
@@ -58,15 +59,16 @@ public:
}
bool operator==(const GrAppliedHardClip& that) const {
- return fScissorState == that.fScissorState && fWindowRectsState == that.fWindowRectsState &&
- fHasStencilClip == that.fHasStencilClip;
+ return fScissorState == that.fScissorState &&
+ fWindowRectsState == that.fWindowRectsState &&
+ fStencilStackID == that.fStencilStackID;
}
bool operator!=(const GrAppliedHardClip& that) const { return !(*this == that); }
private:
GrScissorState fScissorState;
GrWindowRectsState fWindowRectsState;
- bool fHasStencilClip = false;
+ uint32_t fStencilStackID = SkClipStack::kInvalidGenID;
};
/**
@@ -80,6 +82,7 @@ public:
const GrScissorState& scissorState() const { return fHardClip.scissorState(); }
const GrWindowRectsState& windowRectsState() const { return fHardClip.windowRectsState(); }
+ uint32_t stencilStackID() const { return fHardClip.stencilStackID(); }
bool hasStencilClip() const { return fHardClip.hasStencilClip(); }
int numClipCoverageFragmentProcessors() const { return fClipCoverageFPs.count(); }
const GrFragmentProcessor* clipCoverageFragmentProcessor(int i) const {