Chromium Code Reviews| Index: src/gpu/gl/GrGLTexture.cpp |
| diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp |
| index 9fbbed838ffde127a2b368bb80c24c130711356a..1a5e59b074d57ff0410a5393bdccf60200a368ac 100644 |
| --- a/src/gpu/gl/GrGLTexture.cpp |
| +++ b/src/gpu/gl/GrGLTexture.cpp |
| @@ -29,22 +29,19 @@ 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() { |
|
robertphillips
2014/11/03 15:56:01
Don't we still need to worry if it is wrapped ?
bsalomon
2014/11/03 15:58:15
Oh, of course. Fixed.
|
| - fTexIDObj.reset(NULL); |
| + if (fTextureID) { |
| + GL_CALL(DeleteTextures(1, &fTextureID)); |
| + fTextureID = 0; |
| + } |
| INHERITED::onRelease(); |
| } |
| void GrGLTexture::onAbandon() { |
| - if (fTexIDObj.get()) { |
| - fTexIDObj->abandon(); |
| - fTexIDObj.reset(NULL); |
| - } |
| - |
| + fTextureID = 0; |
| INHERITED::onAbandon(); |
| } |