Delete GL tex ID when last of GrGLTexture or GrGLRenderTarget that reference it is destroyed

git-svn-id: http://skia.googlecode.com/svn/trunk@915 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index b0d5e73..1c3de1a 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -1,5 +1,5 @@
 /*
-    Copyright 2010 Google Inc.
+    Copyright 2011 Google Inc.
 
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
@@ -510,7 +510,7 @@
     rtIDs.fRTFBOID  = (GLuint)platformRenderTarget;
     rtIDs.fTexFBOID = (GLuint)platformRenderTarget;
 
-    return new GrGLRenderTarget(rtIDs, stencilBits, viewport, NULL, this);
+    return new GrGLRenderTarget(rtIDs, NULL, stencilBits, viewport, NULL, this);
 }
 
 GrRenderTarget* GrGpuGL::createRenderTargetFrom3DApiStateHelper() {
@@ -529,7 +529,7 @@
 
     rtIDs.fOwnIDs = false;
 
-    return new GrGLRenderTarget(rtIDs, stencilBits, viewport, NULL, this);
+    return new GrGLRenderTarget(rtIDs, NULL, stencilBits, viewport, NULL, this);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1694,11 +1694,6 @@
 
 void GrGpuGL::notifyRenderTargetDelete(GrRenderTarget* renderTarget) {
     GrAssert(NULL != renderTarget);
-
-    // if the bound FBO is destroyed we can't rely on the implicit bind to 0
-    // a) we want the default RT which may not be FBO 0
-    // b) we set more state than just FBO based on the RT
-    // So trash the HW state to force an RT flush next time
     if (fCurrDrawState.fRenderTarget == renderTarget) {
         fCurrDrawState.fRenderTarget = NULL;
     }
@@ -1719,13 +1714,6 @@
     }
 }
 
-void GrGpuGL::notifyTextureRemoveRenderTarget(GrGLTexture* texture) {
-    GrAssert(NULL != texture->asRenderTarget());
-
-    // if there is a pending resolve, perform it.
-    resolveTextureRenderTarget(texture);
-}
-
 bool GrGpuGL::canBeTexture(GrTexture::PixelConfig config,
                            GLenum* internalFormat,
                            GLenum* format,