mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibGfx: Add a test for bitmap export
The verified pixel output in this test just reflects currently observed behavior, I have not verified that all cases output the correct data wrt what the spec expects.
This commit is contained in:
parent
a81e407c44
commit
1f8a42c367
Notes:
github-actions[bot]
2025-11-28 17:34:12 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 1f8a42c367
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
6 changed files with 294 additions and 16 deletions
|
|
@ -31,6 +31,18 @@ struct BackingStore {
|
|||
size_t size_in_bytes { 0 };
|
||||
};
|
||||
|
||||
StringView bitmap_format_name(BitmapFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
#define ENUMERATE_BITMAP_FORMAT(format) \
|
||||
case BitmapFormat::format: \
|
||||
return #format##sv;
|
||||
ENUMERATE_BITMAP_FORMATS(ENUMERATE_BITMAP_FORMAT)
|
||||
#undef ENUMERATE_BITMAP_FORMAT
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
size_t Bitmap::minimum_pitch(size_t width, BitmapFormat format)
|
||||
{
|
||||
size_t element_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue