Index: src/gpu/gl/GrGLRenderTarget.cpp |
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp |
index d4585f6402f926441d3893b632c1c1ebcaafe005..b2918003ca8c71c4f7b0ffd39a566de17dd3732b 100644 |
--- a/src/gpu/gl/GrGLRenderTarget.cpp |
+++ b/src/gpu/gl/GrGLRenderTarget.cpp |
@@ -16,20 +16,21 @@ |
#define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) |
// Because this class is virtually derived from GrSurface we must explicitly call its constructor. |
+// Constructor for wrapped render targets. |
GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, |
const GrSurfaceDesc& desc, |
const IDDesc& idDesc, |
GrGLStencilAttachment* stencil) |
- : GrSurface(gpu, idDesc.fLifeCycle, desc) |
- , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig, stencil) { |
+ : GrSurface(gpu, desc) |
+ , INHERITED(gpu, desc, idDesc.fSampleConfig, stencil) { |
this->init(desc, idDesc); |
- this->registerWithCache(); |
+ this->registerWithCacheWrapped(); |
} |
-GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, const IDDesc& idDesc, |
- Derived) |
- : GrSurface(gpu, idDesc.fLifeCycle, desc) |
- , INHERITED(gpu, idDesc.fLifeCycle, desc, idDesc.fSampleConfig) { |
+GrGLRenderTarget::GrGLRenderTarget(GrGLGpu* gpu, const GrSurfaceDesc& desc, |
+ const IDDesc& idDesc) |
+ : GrSurface(gpu, desc) |
+ , INHERITED(gpu, desc, idDesc.fSampleConfig) { |
this->init(desc, idDesc); |
} |
@@ -37,7 +38,7 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { |
fRTFBOID = idDesc.fRTFBOID; |
fTexFBOID = idDesc.fTexFBOID; |
fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID; |
- fRTLifecycle = idDesc.fLifeCycle; |
+ fRTFBOLifeCycle = idDesc.fRTFBOLifeCycle; |
fViewport.fLeft = 0; |
fViewport.fBottom = 0; |
@@ -119,7 +120,7 @@ bool GrGLRenderTarget::completeStencilAttachment() { |
} |
void GrGLRenderTarget::onRelease() { |
- if (kBorrowed_LifeCycle != fRTLifecycle) { |
+ if (GrBackendObjectLifeCycle::kBorrowed != fRTFBOLifeCycle) { |
if (fTexFBOID) { |
GL_CALL(DeleteFramebuffers(1, &fTexFBOID)); |
} |