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
This commit is contained in:
kkinnunen 2014-12-22 05:57:33 -08:00 committed by Commit bot
parent 534c63ea91
commit 91f8e7f195

View File

@ -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;