Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: src/gpu/GrStencilBuffer.h

Issue 1083133002: Rename GrStencilBuffer to GrStencilAttachment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Align data member Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrStencilAttachment.cpp ('k') | src/gpu/GrStencilBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStencilBuffer.h
diff --git a/src/gpu/GrStencilBuffer.h b/src/gpu/GrStencilBuffer.h
deleted file mode 100644
index 0589935f39dc3fc5f94b671931af79efcdaa80e7..0000000000000000000000000000000000000000
--- a/src/gpu/GrStencilBuffer.h
+++ /dev/null
@@ -1,80 +0,0 @@
-
-/*
- * Copyright 2011 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef GrStencilBuffer_DEFINED
-#define GrStencilBuffer_DEFINED
-
-#include "GrClip.h"
-#include "GrGpuResource.h"
-
-class GrRenderTarget;
-class GrResourceKey;
-
-class GrStencilBuffer : public GrGpuResource {
-public:
- SK_DECLARE_INST_COUNT(GrStencilBuffer);
-
- virtual ~GrStencilBuffer() {
- // TODO: allow SB to be purged and detach itself from rts
- }
-
- int width() const { return fWidth; }
- int height() const { return fHeight; }
- 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 clipSpaceToStencilOffset) {
- fLastClipStackGenID = clipStackGenID;
- fLastClipStackRect = clipSpaceRect;
- fLastClipSpaceOffset = clipSpaceToStencilOffset;
- }
-
- // called to determine if we have to render the clip into SB.
- bool mustRenderClip(int32_t clipStackGenID,
- const SkIRect& clipSpaceRect,
- const SkIPoint clipSpaceToStencilOffset) const {
- return fLastClipStackGenID != clipStackGenID ||
- fLastClipSpaceOffset != clipSpaceToStencilOffset ||
- !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 ComputeSharedStencilBufferKey(int width, int height, int sampleCnt,
- GrUniqueKey* key);
-
-protected:
- GrStencilBuffer(GrGpu* gpu, LifeCycle lifeCycle, int width, int height, int bits, int sampleCnt)
- : GrGpuResource(gpu, lifeCycle)
- , fWidth(width)
- , fHeight(height)
- , fBits(bits)
- , fSampleCnt(sampleCnt)
- , fLastClipStackGenID(SkClipStack::kInvalidGenID) {
- fLastClipStackRect.setEmpty();
- }
-
-private:
-
- int fWidth;
- int fHeight;
- int fBits;
- int fSampleCnt;
-
- int32_t fLastClipStackGenID;
- SkIRect fLastClipStackRect;
- SkIPoint fLastClipSpaceOffset;
-
- typedef GrGpuResource INHERITED;
-};
-
-#endif
« no previous file with comments | « src/gpu/GrStencilAttachment.cpp ('k') | src/gpu/GrStencilBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698