-
kylechar authored
This fixes an issue where textures sampling parameters are incorrect when there is a concurrent read of the texture. For example when an upscaled video texture is read back to draw to a canvas, the texture will end up pixelated some frames and smooth in others. GL_TEXTURE_MAG_FILTER is expected to be GL_LINEAR but it's changed to GL_NEAREST for readback and not reset. There is no way to know if a concurrent read happened in Chrome today so we have to always reset GL texture parameters to avoid it. For GLRenderer always resetting the sampling parameters when binding the texture fixes the provided examples. With SkiaRenderer texture parameters are reset right after BeginAccess() is called on the texture. Bug: 1092080 Change-Id: I968202f3dfff8c3c300c7e98583c55aca8639f81 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431550Reviewed-by:
Sunny Sachanandani <sunnyps@chromium.org> Reviewed-by:
Khushal <khushalsagar@chromium.org> Commit-Queue: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#826358}
b1d6624d