| Index: src/gpu/GrGpu.h
|
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
|
| index ba9e85b54f12924df4a78b85f998b3cdf7f72f6c..58afe4909757b343418dded641279a5ce20eeff0 100644
|
| --- a/src/gpu/GrGpu.h
|
| +++ b/src/gpu/GrGpu.h
|
| @@ -373,8 +373,15 @@ public:
|
| virtual bool isTestingOnlyBackendTexture(GrBackendObject id) const = 0;
|
| virtual void deleteTestingOnlyBackendTexture(GrBackendObject id) const = 0;
|
|
|
| - // Given a rt, find or create a stencil buffer and attach it
|
| - bool attachStencilAttachmentToRenderTarget(GrRenderTarget* target);
|
| + // Given the input GrRenderTarget, this function sets GrStencilAttachment* either
|
| + // from a cached stencil attachment or by creating a new one. If the GrStencilAttachment*
|
| + // that is returned is non-null, the caller will own the ref on the GrStencilAttachment.
|
| + // This function returns true if the returned GrStencilAttachment was newly created in case
|
| + // the caller wants to do any special thing with the stencil (e.g. clearning it).
|
| + bool getStencilAttachment(const GrRenderTarget*, GrStencilAttachment**);
|
| +
|
| + // clears target's entire stencil buffer to 0
|
| + virtual void clearStencil(GrRenderTarget* target) = 0;
|
|
|
| // This is only to be used in GL-specific tests.
|
| virtual const GrGLContext* glContextForTesting() const { return nullptr; }
|
| @@ -471,15 +478,10 @@ private:
|
| const SkIPoint& dstPoint) = 0;
|
|
|
| // width and height may be larger than rt (if underlying API allows it).
|
| - // Should attach the SB to the RT. Returns false if compatible sb could
|
| - // not be created.
|
| - virtual bool createStencilAttachmentForRenderTarget(GrRenderTarget*, int width, int height) = 0;
|
| -
|
| - // attaches an existing SB to an existing RT.
|
| - virtual bool attachStencilAttachmentToRenderTarget(GrStencilAttachment*, GrRenderTarget*) = 0;
|
| -
|
| - // clears target's entire stencil buffer to 0
|
| - virtual void clearStencil(GrRenderTarget* target) = 0;
|
| + // Returns nullptr if compatible sb could not be created.
|
| + virtual GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
|
| + int width,
|
| + int height) = 0;
|
|
|
| void resetContext() {
|
| this->onResetContext(fResetBits);
|
|
|