mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 01:40:46 +00:00
LibGfx: Do not provide BPP
This commit is contained in:
parent
3f5fff79ae
commit
1c733993e0
Notes:
github-actions[bot]
2024-11-22 14:06:43 +00:00
Author: https://github.com/shlyakpavel
Commit: 1c733993e0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2237
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/konradekk
1 changed files with 0 additions and 18 deletions
|
@ -109,26 +109,8 @@ public:
|
|||
|
||||
[[nodiscard]] size_t pitch() const { return m_pitch; }
|
||||
|
||||
[[nodiscard]] static unsigned bpp_for_format(BitmapFormat format)
|
||||
{
|
||||
switch (format) {
|
||||
case BitmapFormat::BGRx8888:
|
||||
case BitmapFormat::BGRA8888:
|
||||
return 32;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
case BitmapFormat::Invalid:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] static size_t minimum_pitch(size_t width, BitmapFormat);
|
||||
|
||||
[[nodiscard]] unsigned bpp() const
|
||||
{
|
||||
return bpp_for_format(m_format);
|
||||
}
|
||||
|
||||
[[nodiscard]] bool has_alpha_channel() const { return m_format == BitmapFormat::BGRA8888 || m_format == BitmapFormat::RGBA8888; }
|
||||
[[nodiscard]] BitmapFormat format() const { return m_format; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue