Disable BGRA MSAA on Mesa

When a client attempts to wrap a GPU-backed texture into an SkSurface
with MSAA, Ganesh will create a MSAA renderbuffer to first render to
before resolving to the single-sampled texture [1]. Mesa claims to
support EXT_texture_format_BGRA8888, and according to the spec [2],
this should imply support for both BGRA textures and renderbuffers.
In practice, however, Mesa only supports BGRA textures and will error
on glRenderbufferStorage* if the internalformat is BGRA [3].

This causes issues on Chromebooks running mesa, so this CL disables
BGRA MSAA in Skia. This will in turn be read by Chrome to stop
antialiased rasterization of BGRA content.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/gpu/ganesh/gl/GrGLGpu.cpp;l=1298;drc=ee5503bf7e1ef7d95d7ff7b248fe82c2ab20d53a
[2] https://registry.khronos.org/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt
[3] https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/mesa/main/fbobject.c#L2326

Bug: b/240075426
Change-Id: Ie6f0d44325ec37567f2156936b273abb9a79a0cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/567638
Commit-Queue: Brian Ho <hob@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2 files changed