aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar kkinnunen <kkinnunen@nvidia.com>2014-12-22 05:57:33 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-22 05:57:33 -0800
commit91f8e7f195fbd39ee88cbcb10abb2216af3f7b76 (patch)
tree9b597882fa95df279267771c36f62657b3dee34b /src
parent534c63ea911e4f7fbf89a2ba37237ea03a723fe9 (diff)
Initialize wrapped render target wrap status correctly
Make GrGLGpu::onWrapBackendRenderTarget update "is wrapped" flag. Otherwise accessing the flag results in uninitialized read, possibly resulting in wrapped render target ending up in the cache. Review URL: https://codereview.chromium.org/818023002
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 5987c7000f..53d3ac2933 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -418,6 +418,7 @@ GrRenderTarget* GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTargetDe
idDesc.fRTFBOID = static_cast<GrGLuint>(wrapDesc.fRenderTargetHandle);
idDesc.fMSColorRenderbufferID = 0;
idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID;
+ idDesc.fIsWrapped = true;
GrSurfaceDesc desc;
desc.fConfig = wrapDesc.fConfig;