| Index: src/gpu/gl/GrGLTexture.cpp
|
| diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
|
| index d9db6ea2a2c652d0bab1a7c3e88c1ad39cd4086b..8777d1b75559765f7117d9359d32911b71ca9c96 100644
|
| --- a/src/gpu/gl/GrGLTexture.cpp
|
| +++ b/src/gpu/gl/GrGLTexture.cpp
|
| @@ -29,22 +29,21 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
|
| 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();
|
| }
|
|
|
|
|