Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Unified Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1433353005: Fix leaks in unit tests of GrGLTextureInfos (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLGpu.cpp
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 5ae116cef848e244c6154a222a1c83a4e43037a6..72262abed3e6888d9793bc274e9abe603451725f 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;
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698