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 |
11 SK_DEFINE_INST_COUNT(GrGLTexID) | |
12 | |
13 #define GPUGL static_cast<GrGpuGL*>(getGpu()) | 11 #define GPUGL static_cast<GrGpuGL*>(getGpu()) |
14 | 12 |
15 #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) | 13 #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) |
16 | 14 |
17 void GrGLTexture::init(GrGpuGL* gpu, | 15 void GrGLTexture::init(GrGpuGL* gpu, |
18 const Desc& textureDesc, | 16 const Desc& textureDesc, |
19 const GrGLRenderTarget::Desc* rtDesc) { | 17 const GrGLRenderTarget::Desc* rtDesc) { |
20 | 18 |
21 SkASSERT(0 != textureDesc.fTextureID); | 19 SkASSERT(0 != textureDesc.fTextureID); |
22 | 20 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 fTexIDObj->abandon(); | 59 fTexIDObj->abandon(); |
62 fTexIDObj.reset(NULL); | 60 fTexIDObj.reset(NULL); |
63 } | 61 } |
64 | 62 |
65 INHERITED::onAbandon(); | 63 INHERITED::onAbandon(); |
66 } | 64 } |
67 | 65 |
68 GrBackendObject GrGLTexture::getTextureHandle() const { | 66 GrBackendObject GrGLTexture::getTextureHandle() const { |
69 return static_cast<GrBackendObject>(this->textureID()); | 67 return static_cast<GrBackendObject>(this->textureID()); |
70 } | 68 } |
OLD | NEW |