aboutsummaryrefslogtreecommitdiff
path: root/src/gpu/gl/GrGLTexture.cpp
diff options
context:
space:
mode:
authorhendrikw <hendrikw@chromium.org>2014-12-09 14:26:47 -0800
committerBrian Salomon <bsalomon@google.com>2014-12-12 09:51:26 -0500
commitb83253202f87a021efbef27ffeb316335d39a5ac (patch)
tree364079618ad94d495d511df33308182062669dfa /src/gpu/gl/GrGLTexture.cpp
parentf6a7f38c6d2450e915bb1dce16885e1073d91f4d (diff)
downloadskia-b83253202f87a021efbef27ffeb316335d39a5ac.tar.gz
Skia: Track the fIsWrapped separately so that we delete correctly
GrGlTextureRenderTarget inherits virtually from both GrGlRenderTarget and GrGLTexture, which both have a 'wrap' flag. The passed in wrap setting could be different for the two base classes, but since it's virtually inherited, they share the same flag, so they're either both on, or both off. As a result, we fail to delete the frambuffer. To fix this, we now keep a separate isWrapped flag for GrGlRenderTarget. BUG=437998 Review URL: https://codereview.chromium.org/791493003
Diffstat (limited to 'src/gpu/gl/GrGLTexture.cpp')
-rw-r--r--src/gpu/gl/GrGLTexture.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 8777d1b75..ce892ddbb 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -30,20 +30,23 @@ void GrGLTexture::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
fTexParams.invalidate();
fTexParamsTimestamp = GrGpu::kExpiredTimestamp;
fTextureID = idDesc.fTextureID;
+ fIsWrapped = idDesc.fIsWrapped;
}
void GrGLTexture::onRelease() {
if (fTextureID) {
- if (!this->isWrapped()) {
+ if (!fIsWrapped) {
GL_CALL(DeleteTextures(1, &fTextureID));
}
fTextureID = 0;
+ fIsWrapped = false;
}
INHERITED::onRelease();
}
void GrGLTexture::onAbandon() {
fTextureID = 0;
+ fIsWrapped = false;
INHERITED::onAbandon();
}