| Index: src/gpu/gl/GrGLTextureRenderTarget.h
|
| diff --git a/src/gpu/gl/GrGLTextureRenderTarget.h b/src/gpu/gl/GrGLTextureRenderTarget.h
|
| index 02db8bc08634994fec3842dbd449cb9f75e64f8e..0826cf3a714dc651773fb1b2b3919b42f6f07480 100644
|
| --- a/src/gpu/gl/GrGLTextureRenderTarget.h
|
| +++ b/src/gpu/gl/GrGLTextureRenderTarget.h
|
| @@ -26,17 +26,23 @@ public:
|
| // We're virtually derived from GrSurface (via both GrGLTexture and GrGLRenderTarget) so its
|
| // constructor must be explicitly called.
|
| GrGLTextureRenderTarget(GrGLGpu* gpu,
|
| + SkBudgeted budgeted,
|
| const GrSurfaceDesc& desc,
|
| const GrGLTexture::IDDesc& texIDDesc,
|
| const GrGLRenderTarget::IDDesc& rtIDDesc)
|
| - : GrSurface(gpu, texIDDesc.fLifeCycle, desc)
|
| - , GrGLTexture(gpu, desc, texIDDesc, GrGLTexture::kDerived)
|
| - , GrGLRenderTarget(gpu, desc, rtIDDesc, GrGLRenderTarget::kDerived) {
|
| - this->registerWithCache();
|
| + : GrSurface(gpu, desc)
|
| + , GrGLTexture(gpu, desc, texIDDesc)
|
| + , GrGLRenderTarget(gpu, desc, rtIDDesc) {
|
| + this->registerWithCache(budgeted);
|
| }
|
|
|
| + bool canAttemptStencilAttachment() const override;
|
| +
|
| void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const override;
|
|
|
| + static GrGLTextureRenderTarget* CreateWrapped(GrGLGpu* gpu, const GrSurfaceDesc& desc,
|
| + const GrGLTexture::IDDesc& texIDDesc,
|
| + const GrGLRenderTarget::IDDesc& rtIDDesc);
|
| protected:
|
| void onAbandon() override {
|
| GrGLRenderTarget::onAbandon();
|
| @@ -49,6 +55,17 @@ protected:
|
| }
|
|
|
| private:
|
| + // Constructor for instances wrapping backend objects.
|
| + GrGLTextureRenderTarget(GrGLGpu* gpu,
|
| + const GrSurfaceDesc& desc,
|
| + const GrGLTexture::IDDesc& texIDDesc,
|
| + const GrGLRenderTarget::IDDesc& rtIDDesc)
|
| + : GrSurface(gpu, desc)
|
| + , GrGLTexture(gpu, desc, texIDDesc)
|
| + , GrGLRenderTarget(gpu, desc, rtIDDesc) {
|
| + this->registerWithCacheWrapped();
|
| + }
|
| +
|
| // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory.
|
| size_t onGpuMemorySize() const override {
|
| return GrGLRenderTarget::onGpuMemorySize();
|
|
|