Index: src/gpu/gl/GrGLRenderTarget.cpp |
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp |
index a89022e27cc3454dfc2c0b9ff21f251a01cecd4c..e93c5c100be2a206756e107c675acd10d4bfe072 100644 |
--- a/src/gpu/gl/GrGLRenderTarget.cpp |
+++ b/src/gpu/gl/GrGLRenderTarget.cpp |
@@ -31,7 +31,7 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { |
fRTFBOID = idDesc.fRTFBOID; |
fTexFBOID = idDesc.fTexFBOID; |
fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID; |
- fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle; |
+ fRTLifecycle = idDesc.fLifeCycle; |
fViewport.fLeft = 0; |
fViewport.fBottom = 0; |
@@ -59,7 +59,7 @@ size_t GrGLRenderTarget::onGpuMemorySize() const { |
} |
void GrGLRenderTarget::onRelease() { |
- if (!fIsWrapped) { |
+ if (kBorrowed_LifeCycle != fRTLifecycle) { |
if (fTexFBOID) { |
GL_CALL(DeleteFramebuffers(1, &fTexFBOID)); |
} |
@@ -73,7 +73,6 @@ void GrGLRenderTarget::onRelease() { |
fRTFBOID = 0; |
fTexFBOID = 0; |
fMSColorRenderbufferID = 0; |
- fIsWrapped = false; |
INHERITED::onRelease(); |
} |
@@ -81,6 +80,5 @@ void GrGLRenderTarget::onAbandon() { |
fRTFBOID = 0; |
fTexFBOID = 0; |
fMSColorRenderbufferID = 0; |
- fIsWrapped = false; |
INHERITED::onAbandon(); |
} |