LibGfx: Add FIXME about potentially incorrect alpha handling

This commit is contained in:
InvalidUsernameException
2025-11-23 13:07:42 +01:00
committed by Jelle Raaijmakers
parent 6847185d9a
commit 9e60dc57b4
Notes: github-actions[bot] 2025-11-28 17:34:26 +00:00

View File

@@ -32,7 +32,10 @@ constexpr SkColorType to_skia_color_type(Gfx::BitmapFormat format)
case Gfx::BitmapFormat::Invalid:
return kUnknown_SkColorType;
case Gfx::BitmapFormat::BGRA8888:
return kBGRA_8888_SkColorType;
case Gfx::BitmapFormat::BGRx8888:
// FIXME: This is not fully correct, since our bitmap's alpha component might contain garbage data.
// If the alpha component does not contain 0xFF, Skia might wrongly use that value as alpha.
return kBGRA_8888_SkColorType;
case Gfx::BitmapFormat::RGBA8888:
return kRGBA_8888_SkColorType;