diff options
author | csmartdalton <csmartdalton@google.com> | 2016-11-01 07:03:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-01 07:03:03 -0700 |
commit | 7cdda99ac34dbe249640be04d2e61bfb0f4b3b09 (patch) | |
tree | 6c9ce4d6cb41534da18d086d7f2cf5f322faef6a /src/gpu/GrStencilAttachment.h | |
parent | 8a8668b4721097de657ad8b30d45f60f62433c6f (diff) |
TEMPORARY: track stencil clip state in GrRenderTargetOpList
Tracks the stencil clip state in GrRenderTargetOpList instead of
GrStencilAttachment. This is a temporary move to unblock MDB, after
which point we will be able to overhaul clipping.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2468743002
Review-Url: https://codereview.chromium.org/2468743002
Diffstat (limited to 'src/gpu/GrStencilAttachment.h')
-rw-r--r-- | src/gpu/GrStencilAttachment.h | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/gpu/GrStencilAttachment.h b/src/gpu/GrStencilAttachment.h index 0ed3c8b27c..08d6799f62 100644 --- a/src/gpu/GrStencilAttachment.h +++ b/src/gpu/GrStencilAttachment.h @@ -28,24 +28,6 @@ public: int bits() const { return fBits; } int numSamples() const { return fSampleCnt; } - // called to note the last clip drawn to this buffer. - void setLastClip(int32_t clipStackGenID, - const SkIRect& clipSpaceRect, - const SkIPoint clipOrigin) { - fLastClipStackGenID = clipStackGenID; - fLastClipStackRect = clipSpaceRect; - fLastClipOrigin = clipOrigin; - } - - // called to determine if we have to render the clip into SB. - bool mustRenderClip(int32_t clipStackGenID, - const SkIRect& clipSpaceRect, - const SkIPoint& clipOrigin) const { - return fLastClipStackGenID != clipStackGenID || - fLastClipOrigin != clipOrigin || - !fLastClipStackRect.contains(clipSpaceRect); - } - // We create a unique stencil buffer at each width, height and sampleCnt and share it for // all render targets that require a stencil with those params. static void ComputeSharedStencilAttachmentKey(int width, int height, int sampleCnt, @@ -57,9 +39,7 @@ protected: , fWidth(width) , fHeight(height) , fBits(bits) - , fSampleCnt(sampleCnt) - , fLastClipStackGenID(SkClipStack::kInvalidGenID) { - fLastClipStackRect.setEmpty(); + , fSampleCnt(sampleCnt) { } private: @@ -69,10 +49,6 @@ private: int fBits; int fSampleCnt; - int32_t fLastClipStackGenID; - SkIRect fLastClipStackRect; - SkIPoint fLastClipOrigin; - typedef GrGpuResource INHERITED; }; |