Remove GrGLTexID
BUG=skia:2889
Review URL: https://codereview.chromium.org/695133003
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index d9db6ea..8777d1b 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -29,22 +29,21 @@
SkASSERT(0 != idDesc.fTextureID);
fTexParams.invalidate();
fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
- fTexIDObj.reset(SkNEW_ARGS(GrGLTexID, (GPUGL->glInterface(),
- idDesc.fTextureID,
- idDesc.fIsWrapped)));
+ fTextureID = idDesc.fTextureID;
}
void GrGLTexture::onRelease() {
- fTexIDObj.reset(NULL);
+ if (fTextureID) {
+ if (!this->isWrapped()) {
+ GL_CALL(DeleteTextures(1, &fTextureID));
+ }
+ fTextureID = 0;
+ }
INHERITED::onRelease();
}
void GrGLTexture::onAbandon() {
- if (fTexIDObj.get()) {
- fTexIDObj->abandon();
- fTexIDObj.reset(NULL);
- }
-
+ fTextureID = 0;
INHERITED::onAbandon();
}