Bug 1672379 - Use RGBA8 renderbuffer if required when blitting to BGRA8 texture. r=kvark
Bug 1672379 - Use RGBA8 renderbuffer if required when blitting to BGRA8 texture. r=kvark

On some Adreno devices, we are unable to blit directly to texture
arrays. To work around this, we first blit to a renderbuffer, then
copy the data from there to the destination texture.

As renderbuffers cannot be BGRA8, we currently panic when attempting
to create a renderbuffer for blitting to a BGRA8 texture. This
situation should be uncommon, as the devices which require this
renderbuffer usually don't support EXT_buffer_storage, meaning we use
RGBA8 textures.

However, we have seen instances of this panic on some esoteric
hardware configurations (x86 + Adreno GPU). To fix this, use RGBA8 for
the renderbuffer format when the texture is BGRA8.

Differential Revision: https://phabricator.services.mozilla.com/D94347

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/8bf38aac1bcc6fe8c4566c68f85a2671afdfaf27

servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender,servo/webrender