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

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

Issue 1187523005: Add support for creating texture backed images where Skia will delete the texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add default param to support Chrome's current callers Created 5 years, 6 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
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLTexture.cpp
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index faa9f35cd41181ec45ddf93e753efca448f76d66..f855e5458bedfc84d8a5ea0cdffd17b55d3f3eda 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -30,23 +30,21 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
fTexParams.invalidate();
fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
fTextureID = idDesc.fTextureID;
- fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle;
+ fTextureIDLifecycle = idDesc.fLifeCycle;
}
void GrGLTexture::onRelease() {
if (fTextureID) {
- if (!fIsWrapped) {
+ if (GrGpuResource::kBorrowed_LifeCycle != fTextureIDLifecycle) {
GL_CALL(DeleteTextures(1, &fTextureID));
}
fTextureID = 0;
- fIsWrapped = false;
}
INHERITED::onRelease();
}
void GrGLTexture::onAbandon() {
fTextureID = 0;
- fIsWrapped = false;
INHERITED::onAbandon();
}
« no previous file with comments | « src/gpu/gl/GrGLTexture.h ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698