Skip to content

Commit 9e60dc5

Browse files
InvalidUsernameExceptiongmta
authored andcommitted
LibGfx: Add FIXME about potentially incorrect alpha handling
1 parent 6847185 commit 9e60dc5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Libraries/LibGfx/SkiaUtils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ constexpr SkColorType to_skia_color_type(Gfx::BitmapFormat format)
3232
case Gfx::BitmapFormat::Invalid:
3333
return kUnknown_SkColorType;
3434
case Gfx::BitmapFormat::BGRA8888:
35+
return kBGRA_8888_SkColorType;
3536
case Gfx::BitmapFormat::BGRx8888:
37+
// FIXME: This is not fully correct, since our bitmap's alpha component might contain garbage data.
38+
// If the alpha component does not contain 0xFF, Skia might wrongly use that value as alpha.
3639
return kBGRA_8888_SkColorType;
3740
case Gfx::BitmapFormat::RGBA8888:
3841
return kRGBA_8888_SkColorType;

0 commit comments

Comments
 (0)