mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibGfx: Add FIXME about potentially incorrect alpha handling
This commit is contained in:
parent
6847185d9a
commit
9e60dc57b4
Notes:
github-actions[bot]
2025-11-28 17:34:26 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 9e60dc57b4
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue