diff options
author | 2015-09-14 12:56:10 -0700 | |
---|---|---|
committer | 2015-09-14 12:56:10 -0700 | |
commit | ec00d94199fad7723b5987b86c1abef8ddafe2d8 (patch) | |
tree | 4161bb293ffe433cbe0fd41a4ad0263b36eedffd /src/gpu/gl/GrGLGpu.h | |
parent | 37497dc9de9cf8df4f9dd972b50cbd35b9da6682 (diff) |
Move some of the adding stencil attachment logic of Gpu and into Render Target.
The new flow of calls for attaching a Stencil looks like:
Client
rt->attachStencilAttachment()
gpu->getStencilAttachment()
glgpu->createStencilAttachment()
glrt->completeStencilAttachment() //actually attaches
BUG=skia:
Review URL: https://codereview.chromium.org/1333383002
Diffstat (limited to 'src/gpu/gl/GrGLGpu.h')
-rw-r--r-- | src/gpu/gl/GrGLGpu.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h index fecede06c7..833f1ff7ec 100644 --- a/src/gpu/gl/GrGLGpu.h +++ b/src/gpu/gl/GrGLGpu.h @@ -99,6 +99,16 @@ public: return &this->glContext(); } + void clearStencil(GrRenderTarget*) override; + + void invalidateBoundRenderTarget() { + fHWBoundRenderTargetUniqueID = SK_InvalidUniqueID; + } + + GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget* rt, + int width, + int height) override; + GrBackendObject createTestingOnlyBackendTexture(void* pixels, int w, int h, GrPixelConfig config) const override; bool isTestingOnlyBackendTexture(GrBackendObject id) const override; @@ -122,9 +132,6 @@ private: GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&, GrWrapOwnership) override; GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&, GrWrapOwnership) override; - bool createStencilAttachmentForRenderTarget(GrRenderTarget* rt, int width, int height) override; - bool attachStencilAttachmentToRenderTarget(GrStencilAttachment* sb, - GrRenderTarget* rt) override; // Given a GrPixelConfig return the index into the stencil format array on GrGLCaps to a // compatible stencil format. int getCompatibleStencilIndex(GrPixelConfig config); @@ -154,8 +161,6 @@ private: const SkIRect& srcRect, const SkIPoint& dstPoint) override; - void clearStencil(GrRenderTarget*) override; - // binds texture unit in GL void setTextureUnit(int unitIdx); |