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
This commit is contained in:
Scroggo 2011-06-16 13:14:21 +00:00
parent 8ac7a0fcef
commit c29d7cdf3e

View File

@ -40,9 +40,9 @@ GrGLRenderTarget::GrGLRenderTarget(GrGpuGL* gpu,
}
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 @@ GrGLTexture::GrGLTexture(GrGpuGL* gpu,
void GrGLTexture::onRelease() {
INHERITED::onRelease();
GPUGL->notifyTextureDelete(this);
if (NULL != fTexIDObj) {
GPUGL->notifyTextureDelete(this);
fTexIDObj->unref();
fTexIDObj = NULL;
}