SharedImageBackingFactoryGLTexture: Fix compatibility swizzle
Textures that are uploaded as GL_LUMINANCE_ALPHA, GL_LUMINANCE, or GL_ALPHA, are, on some platforms, emulated using glTexParameteri with GL_TEXTURE_SWIZZLE_R/G/B. The call to glTexParameteri needs to be done after the glTexImage2D call that uploads the pixel data. Do this. Remove swizzle from the common parameters because GLImages don't support the formats that require swizzles. Add a DCHECK in case we're trying to do that anyway. Bug: 1096361 Change-Id: I0b58a7ccb803108d0b3b0c43a68a6709d869aea8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2276578Reviewed-by:Corentin Wallez <cwallez@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#784234}
Showing
Please register or sign in to comment