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

Unified Diff: src/gpu/gl/GrGLRenderTarget.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/GrGLRenderTarget.h ('k') | src/gpu/gl/GrGLStencilAttachment.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLRenderTarget.cpp
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index a89022e27cc3454dfc2c0b9ff21f251a01cecd4c..e93c5c100be2a206756e107c675acd10d4bfe072 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -31,7 +31,7 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
fRTFBOID = idDesc.fRTFBOID;
fTexFBOID = idDesc.fTexFBOID;
fMSColorRenderbufferID = idDesc.fMSColorRenderbufferID;
- fIsWrapped = kWrapped_LifeCycle == idDesc.fLifeCycle;
+ fRTLifecycle = idDesc.fLifeCycle;
fViewport.fLeft = 0;
fViewport.fBottom = 0;
@@ -59,7 +59,7 @@ size_t GrGLRenderTarget::onGpuMemorySize() const {
}
void GrGLRenderTarget::onRelease() {
- if (!fIsWrapped) {
+ if (kBorrowed_LifeCycle != fRTLifecycle) {
if (fTexFBOID) {
GL_CALL(DeleteFramebuffers(1, &fTexFBOID));
}
@@ -73,7 +73,6 @@ void GrGLRenderTarget::onRelease() {
fRTFBOID = 0;
fTexFBOID = 0;
fMSColorRenderbufferID = 0;
- fIsWrapped = false;
INHERITED::onRelease();
}
@@ -81,6 +80,5 @@ void GrGLRenderTarget::onAbandon() {
fRTFBOID = 0;
fTexFBOID = 0;
fMSColorRenderbufferID = 0;
- fIsWrapped = false;
INHERITED::onAbandon();
}
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.h ('k') | src/gpu/gl/GrGLStencilAttachment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698