From 91f8e7f195fbd39ee88cbcb10abb2216af3f7b76 Mon Sep 17 00:00:00 2001 From: kkinnunen Date: Mon, 22 Dec 2014 05:57:33 -0800 Subject: 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 --- src/gpu/gl/GrGpuGL.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gpu/gl') 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(wrapDesc.fRenderTargetHandle); idDesc.fMSColorRenderbufferID = 0; idDesc.fTexFBOID = GrGLRenderTarget::kUnresolvableFBOID; + idDesc.fIsWrapped = true; GrSurfaceDesc desc; desc.fConfig = wrapDesc.fConfig; -- cgit v1.2.3