mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
GraphicsBitmap: Allow constructing a wrapper bitmap around 8-bit pixels
This will be very useful for optimizing games like DOOM. :^)
This commit is contained in:
parent
813deaed45
commit
ec5091fa7d
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@ GraphicsBitmap::GraphicsBitmap(Format format, const Size& size, size_t pitch, RG
|
|||
, m_pitch(pitch)
|
||||
, m_format(format)
|
||||
{
|
||||
ASSERT(format != Format::Indexed8);
|
||||
if (format == Format::Indexed8)
|
||||
m_palette = new RGBA32[256];
|
||||
}
|
||||
|
||||
GraphicsBitmap::GraphicsBitmap(Format format, const Size& size, MappedFile&& mapped_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue