| 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 16 matching lines...) Expand all Loading... |
| 27 textureDesc.fTextureID, | 27 textureDesc.fTextureID, |
| 28 textureDesc.fIsWrapped)); | 28 textureDesc.fIsWrapped)); |
| 29 | 29 |
| 30 if (NULL != rtDesc) { | 30 if (NULL != rtDesc) { |
| 31 GrGLIRect vp; | 31 GrGLIRect vp; |
| 32 vp.fLeft = 0; | 32 vp.fLeft = 0; |
| 33 vp.fWidth = textureDesc.fWidth; | 33 vp.fWidth = textureDesc.fWidth; |
| 34 vp.fBottom = 0; | 34 vp.fBottom = 0; |
| 35 vp.fHeight = textureDesc.fHeight; | 35 vp.fHeight = textureDesc.fHeight; |
| 36 | 36 |
| 37 fRenderTarget = SkNEW_ARGS(GrGLRenderTarget, | 37 fRenderTarget.reset(SkNEW_ARGS(GrGLRenderTarget, (gpu, *rtDesc, vp, fTex
IDObj, this))); |
| 38 (gpu, *rtDesc, vp, fTexIDObj, this)); | |
| 39 } | 38 } |
| 40 } | 39 } |
| 41 | 40 |
| 42 GrGLTexture::GrGLTexture(GrGpuGL* gpu, | 41 GrGLTexture::GrGLTexture(GrGpuGL* gpu, |
| 43 const Desc& textureDesc) | 42 const Desc& textureDesc) |
| 44 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { | 43 : INHERITED(gpu, textureDesc.fIsWrapped, textureDesc) { |
| 45 this->init(gpu, textureDesc, NULL); | 44 this->init(gpu, textureDesc, NULL); |
| 46 } | 45 } |
| 47 | 46 |
| 48 GrGLTexture::GrGLTexture(GrGpuGL* gpu, | 47 GrGLTexture::GrGLTexture(GrGpuGL* gpu, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 66 if (NULL != fTexIDObj) { | 65 if (NULL != fTexIDObj) { |
| 67 fTexIDObj->abandon(); | 66 fTexIDObj->abandon(); |
| 68 } | 67 } |
| 69 | 68 |
| 70 INHERITED::onAbandon(); | 69 INHERITED::onAbandon(); |
| 71 } | 70 } |
| 72 | 71 |
| 73 GrBackendObject GrGLTexture::getTextureHandle() const { | 72 GrBackendObject GrGLTexture::getTextureHandle() const { |
| 74 return fTexIDObj->id(); | 73 return fTexIDObj->id(); |
| 75 } | 74 } |
| OLD | NEW |