diff options
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 7eb833c880..2fe9c023b2 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -723,20 +723,19 @@ GrRenderTarget* GrGLGpu::onWrapBackendTextureAsRenderTarget(const GrBackendTextu } #endif - GrGLTexture::IDDesc idDesc; - idDesc.fOwnership = GrBackendObjectOwnership::kBorrowed; + GrGLTextureInfo texInfo; GrSurfaceDesc surfDesc; #ifdef SK_IGNORE_GL_TEXTURE_TARGET - idDesc.fInfo.fID = static_cast<GrGLuint>(desc.fTextureHandle); + texInfo.fID = static_cast<GrGLuint>(desc.fTextureHandle); // We only support GL_TEXTURE_2D at the moment. - idDesc.fInfo.fTarget = GR_GL_TEXTURE_2D; + texInfo.fTarget = GR_GL_TEXTURE_2D; #else - idDesc.fInfo = *info; + texInfo = *info; #endif - if (GR_GL_TEXTURE_RECTANGLE != idDesc.fInfo.fTarget && - GR_GL_TEXTURE_2D != idDesc.fInfo.fTarget) { + if (GR_GL_TEXTURE_RECTANGLE != texInfo.fTarget && + GR_GL_TEXTURE_2D != texInfo.fTarget) { // Only texture rectangle and texture 2d are supported. We do not check whether texture // rectangle is supported by Skia - if the caller provided us with a texture rectangle, // we assume the necessary support exists. @@ -759,10 +758,10 @@ GrRenderTarget* GrGLGpu::onWrapBackendTextureAsRenderTarget(const GrBackendTextu } GrGLRenderTarget::IDDesc rtIDDesc; - if (!this->createRenderTargetObjects(surfDesc, idDesc.fInfo, &rtIDDesc)) { + if (!this->createRenderTargetObjects(surfDesc, texInfo, &rtIDDesc)) { return nullptr; } - return GrGLTextureRenderTarget::CreateWrapped(this, surfDesc, idDesc, rtIDDesc); + return GrGLRenderTarget::CreateWrapped(this, surfDesc, rtIDDesc, 0); } //////////////////////////////////////////////////////////////////////////////// |