Add some missed BGRA_1010102 testing tidbits
A follow up to: https://skia-review.googlesource.com/c/skia/+/285356 (Add BGR_10A2 support to Ganesh) Change-Id: If19e234bf80d4affd515d6168f1faeec13f4fcf8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285856 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
84aa92e428
commit
cbc9667025
@ -4462,6 +4462,8 @@ std::vector<GrCaps::TestFormatColorTypeCombination> GrGLCaps::getTestingCombinat
|
||||
if (GR_IS_GR_GL(fStandard)) {
|
||||
combos.push_back({ GrColorType::kBGRA_8888,
|
||||
GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) });
|
||||
combos.push_back({ GrColorType::kBGRA_1010102,
|
||||
GrBackendFormat::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_2D) });
|
||||
} else {
|
||||
SkASSERT(GR_IS_GR_GL_ES(fStandard) || GR_IS_GR_WEBGL(fStandard));
|
||||
|
||||
|
@ -31,8 +31,9 @@ static void validate_alpha_data(skiatest::Reporter* reporter, int w, int h, cons
|
||||
for (int x = 0; x < w; ++x) {
|
||||
uint8_t a = actual[y * actualRowBytes + x];
|
||||
uint8_t e = expected[y * w + x];
|
||||
if (GrColorType::kRGBA_1010102 == colorType) {
|
||||
// This config only preserves two bits of alpha
|
||||
if (GrColorType::kRGBA_1010102 == colorType ||
|
||||
GrColorType::kBGRA_1010102 == colorType) {
|
||||
// These configs only preserves two bits of alpha
|
||||
a >>= 6;
|
||||
e >>= 6;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user