Index: src/gpu/gl/GrGLTexture.cpp |
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp |
index faa9f35cd41181ec45ddf93e753efca448f76d66..f855e5458bedfc84d8a5ea0cdffd17b55d3f3eda 100644 |
--- a/src/gpu/gl/GrGLTexture.cpp |
+++ b/src/gpu/gl/GrGLTexture.cpp |
@@ -30,23 +30,21 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) { |
fTexParams.invalidate(); |
fTexParamsTimestamp = GrGpu::kExpiredTimestamp; |
fTextureID = idDesc.fTextureID; |
- fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle; |
+ fTextureIDLifecycle = idDesc.fLifeCycle; |
} |
void GrGLTexture::onRelease() { |
if (fTextureID) { |
- if (!fIsWrapped) { |
+ if (GrGpuResource::kBorrowed_LifeCycle != fTextureIDLifecycle) { |
GL_CALL(DeleteTextures(1, &fTextureID)); |
} |
fTextureID = 0; |
- fIsWrapped = false; |
} |
INHERITED::onRelease(); |
} |
void GrGLTexture::onAbandon() { |
fTextureID = 0; |
- fIsWrapped = false; |
INHERITED::onAbandon(); |
} |