diff options
author | bsalomon <bsalomon@google.com> | 2015-11-11 12:40:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-11 12:40:42 -0800 |
commit | 67d7620285cdfa60158add6615db03bd48e6d8b0 (patch) | |
tree | cc658c120433b59378beff7ad1d1ec495878153e /src/gpu/gl/GrGLGpu.cpp | |
parent | a13e202563979fd5076936606dcc1d660da8c632 (diff) |
Fix leaks in unit tests of GrGLTextureInfos
TBR=egdaniel@google.com
Review URL: https://codereview.chromium.org/1433353005
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 5ae116cef8..72262abed3 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3291,7 +3291,7 @@ bool GrGLGpu::isTestingOnlyBackendTexture(GrBackendObject id) const { return (GR_GL_TRUE == result); } -void GrGLGpu::deleteTestingOnlyBackendTexture(GrBackendObject id) const { +void GrGLGpu::deleteTestingOnlyBackendTexture(GrBackendObject id, bool abandonTexture) const { #ifdef SK_IGNORE_GL_TEXTURE_TARGET GrGLuint texID = (GrGLuint)id; #else @@ -3299,7 +3299,9 @@ void GrGLGpu::deleteTestingOnlyBackendTexture(GrBackendObject id) const { GrGLuint texID = info->fID; #endif - GL_CALL(DeleteTextures(1, &texID)); + if (!abandonTexture) { + GL_CALL(DeleteTextures(1, &texID)); + } #ifndef SK_IGNORE_GL_TEXTURE_TARGET delete info; |