Revert "testautomation: don't validate alpha values on XRGB formats"

This reverts commit 759e01bd64.

It's better to return the expected format from SDL_RenderReadPixels() than skip alpha testing.
This commit is contained in:
Sam Lantinga committed 2025-01-20 12:57:48 -08:00
1 parent dcadd23ba1
commit 9b454a762c
2 files changed
+17 -8

No files matched your search

+1 -6
View File
@@ -897,12 +897,7 @@ static void testBlendModeOperation(TestRenderOperation op, int mode, SDL_PixelFo
deltaR = SDL_abs((int)actualR - expectedR);
deltaG = SDL_abs((int)actualG - expectedG);
deltaB = SDL_abs((int)actualB - expectedB);
if (SDL_ISPIXELFORMAT_ALPHA(dst_format)) {
deltaA = SDL_abs((int)actualA - expectedA);
} else {
// The alpha channel is ignored in non-alpha formats, so don't validate it
deltaA = 0;
}
deltaA = SDL_abs((int)actualA - expectedA);
SDLTest_AssertCheck(
deltaR <= MAXIMUM_ERROR &&
deltaG <= MAXIMUM_ERROR &&