| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * Copyright 2011 Google Inc. |   2  * Copyright 2011 Google Inc. | 
|   3  * |   3  * | 
|   4  * Use of this source code is governed by a BSD-style license that can be |   4  * Use of this source code is governed by a BSD-style license that can be | 
|   5  * found in the LICENSE file. |   5  * found in the LICENSE file. | 
|   6  */ |   6  */ | 
|   7  |   7  | 
|   8 #include "GrGLTexture.h" |   8 #include "GrGLTexture.h" | 
|   9 #include "GrGpuGL.h" |   9 #include "GrGpuGL.h" | 
|  10  |  10  | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  42 } |  42 } | 
|  43  |  43  | 
|  44 GrGLTexture::GrGLTexture(GrGpuGL* gpu, |  44 GrGLTexture::GrGLTexture(GrGpuGL* gpu, | 
|  45                          const Desc& textureDesc, |  45                          const Desc& textureDesc, | 
|  46                          const GrGLRenderTarget::Desc& rtDesc) |  46                          const GrGLRenderTarget::Desc& rtDesc) | 
|  47     : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { |  47     : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { | 
|  48     this->init(gpu, textureDesc, &rtDesc); |  48     this->init(gpu, textureDesc, &rtDesc); | 
|  49 } |  49 } | 
|  50  |  50  | 
|  51 void GrGLTexture::onRelease() { |  51 void GrGLTexture::onRelease() { | 
 |  52     GPUGL->notifyTextureDelete(this); | 
|  52     fTexIDObj.reset(NULL); |  53     fTexIDObj.reset(NULL); | 
|  53     INHERITED::onRelease(); |  54     INHERITED::onRelease(); | 
|  54 } |  55 } | 
|  55  |  56  | 
|  56 void GrGLTexture::onAbandon() { |  57 void GrGLTexture::onAbandon() { | 
|  57     if (NULL != fTexIDObj.get()) { |  58     if (NULL != fTexIDObj.get()) { | 
|  58         fTexIDObj->abandon(); |  59         fTexIDObj->abandon(); | 
|  59         fTexIDObj.reset(NULL); |  60         fTexIDObj.reset(NULL); | 
|  60     } |  61     } | 
|  61  |  62  | 
|  62     INHERITED::onAbandon(); |  63     INHERITED::onAbandon(); | 
|  63 } |  64 } | 
|  64  |  65  | 
|  65 GrBackendObject GrGLTexture::getTextureHandle() const { |  66 GrBackendObject GrGLTexture::getTextureHandle() const { | 
|  66     return static_cast<GrBackendObject>(this->textureID()); |  67     return static_cast<GrBackendObject>(this->textureID()); | 
|  67 } |  68 } | 
| OLD | NEW |