| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 if (NULL != rtDesc) { | 27 if (NULL != rtDesc) { |
| 28 GrGLIRect vp; | 28 GrGLIRect vp; |
| 29 vp.fLeft = 0; | 29 vp.fLeft = 0; |
| 30 vp.fWidth = textureDesc.fWidth; | 30 vp.fWidth = textureDesc.fWidth; |
| 31 vp.fBottom = 0; | 31 vp.fBottom = 0; |
| 32 vp.fHeight = textureDesc.fHeight; | 32 vp.fHeight = textureDesc.fHeight; |
| 33 | 33 |
| 34 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex
IDObj, this))); | 34 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex
IDObj, this))); |
| 35 } | 35 } |
| 36 this->registerWithCache(); |
| 36 } | 37 } |
| 37 | 38 |
| 38 GrGLTexture::GrGLTexture(GrGpuGL* gpu, | 39 GrGLTexture::GrGLTexture(GrGpuGL* gpu, |
| 39 const Desc& textureDesc) | 40 const Desc& textureDesc) |
| 40 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { | 41 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { |
| 41 this->init(gpu, textureDesc, NULL); | 42 this->init(gpu, textureDesc, NULL); |
| 42 } | 43 } |
| 43 | 44 |
| 44 GrGLTexture::GrGLTexture(GrGpuGL* gpu, | 45 GrGLTexture::GrGLTexture(GrGpuGL* gpu, |
| 45 const Desc& textureDesc, | 46 const Desc& textureDesc, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 |