mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-05 01:10:24 +00:00
LibGfx: Add FIXME about potentially incorrect alpha handling
This commit is contained in:
committed by
Jelle Raaijmakers
parent
6847185d9a
commit
9e60dc57b4
Notes:
github-actions[bot]
2025-11-28 17:34:26 +00:00
Author: https://github.com/InvalidUsernameException Commit: https://github.com/LadybirdBrowser/ladybird/commit/9e60dc57b46 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6911 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/Psychpsyo Reviewed-by: https://github.com/gmta
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user