Narrow fix for creating BGRA backend texture from pixmaps on desktop GL.
Narrow fix for creating BGRA backend texture from pixmaps on desktop GL.

GrTestingBackendTextureUploadTest creates backend textures from BGRA
pixmaps. There is a bug on desktop GL. We choose a RGBA format for the
texture. We then infer the color type of the data from the format (via
a hop through GrPixelConfig) as RGBA and upload it as such.

Currently we don't fail the test because the test fails to read the data
back (because we don't support direct reading of BGRA data from textures
in GL).

Fixing the read back causes the test to fail.

This change removes the inference of color type from the format and
instead uses the pixmaps' color type.

This doesn't fix several larger issues, including:

1) The intended color type is not specified when creating a texture of a
solid color so we still infer it from the format in that case.

2) We may not support direct uploading of data in the pixmaps' color type
to the chosen texture format but must first convert it to some other
color type on the CPU.


Change-Id: I3b1022c40201fc107cb39bbb5cca775795c828e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250336
Commit-Queue: Brian Salomon <61fabaaf0876044aeedfd8e351e485c028d69e7b@google.com>
Reviewed-by: Robert Phillips <95e8ac5504948c7bf91b22c16a8dbb7ae7c66bfd@google.com>

aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc