Lee Salzman ce2bd5b47f Bug 1755780 - Optimize DrawTargetWebgl for BGRA WebGL framebuffer. r=aosmond
Currently within DrawTargetWebGL, the Skia framebuffer and external software
surfaces are in BGRA, while the WebGL framebuffer is in RGBA. This requires
swizzling all software surfaces to RGBA on upload and swizzling surfaces
back to BGRA on readback. This can either require intermediate surfaces or
extra costly processing.

Now that CopyToSwapChain is available with support for a BGRA blit, we can
remove these complications by just treating the WebGL framebuffer as if it
was BGRA directly, so that any uploads or readbacks do not require a swizzle.

Differential Revision: https://phabricator.services.mozilla.com/D139066
2022-02-21 17:33:09 +00:00
..