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

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

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Add a context parameter to function pointers. Created 4 years, 11 months 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
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 39a8d9279feef49637882b5e7a15a1c0e59305d5..10a37e88725582d411bd1197a4a98e132d7ca11d 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -37,6 +37,11 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
void GrGLTexture::onRelease() {
if (fInfo.fID) {
if (GrGpuResource::kBorrowed_LifeCycle != fTextureIDLifecycle) {
+ if (desc().fTextureStorageAllocator.fDeallocateTextureStorage) {
+ desc().fTextureStorageAllocator.fDeallocateTextureStorage(
+ desc().fTextureStorageAllocator.fCtx,
+ reinterpret_cast<GrBackendObject>(&fInfo));
+ }
GL_CALL(DeleteTextures(1, &fInfo.fID));
bsalomon 2016/02/01 14:54:42 this->desc(). Shouldn't we be skipping DeleteText
erikchen 2016/02/01 22:58:32 Responded to both comments.
}
fInfo.fID = 0;
« include/gpu/GrTypes.h ('K') | « src/gpu/gl/GrGLGpu.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698