Always call notifyTextureDelete in onRelease.
Reviewed at http://codereview.appspot.com/4620050/
git-svn-id: http://skia.googlecode.com/svn/trunk@1611 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index 59b1162..fec1e74 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -40,9 +40,9 @@
}
void GrGLRenderTarget::onRelease() {
+ GPUGL->notifyRenderTargetDelete(this);
if (fOwnIDs) {
if (fTexFBOID) {
- GPUGL->notifyRenderTargetDelete(this);
GR_GL(DeleteFramebuffers(1, &fTexFBOID));
}
if (fRTFBOID && fRTFBOID != fTexFBOID) {
@@ -139,8 +139,8 @@
void GrGLTexture::onRelease() {
INHERITED::onRelease();
+ GPUGL->notifyTextureDelete(this);
if (NULL != fTexIDObj) {
- GPUGL->notifyTextureDelete(this);
fTexIDObj->unref();
fTexIDObj = NULL;
}