diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 11:19:49 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 11:20:07 +0200 |
commit | ec5091fa7d760278d252c62d713d304715d55d96 (patch) | |
tree | f3aa57138942c2d34cd5f6da461e01d71b0bf8b8 /Libraries/LibDraw | |
parent | 813deaed450a6b87bd8dc7bbefa6cc5fa5dbff97 (diff) | |
download | serenity-ec5091fa7d760278d252c62d713d304715d55d96.zip |
GraphicsBitmap: Allow constructing a wrapper bitmap around 8-bit pixels
This will be very useful for optimizing games like DOOM. :^)
Diffstat (limited to 'Libraries/LibDraw')
-rw-r--r-- | Libraries/LibDraw/GraphicsBitmap.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibDraw/GraphicsBitmap.cpp b/Libraries/LibDraw/GraphicsBitmap.cpp index 77fad40f25..b09996761d 100644 --- a/Libraries/LibDraw/GraphicsBitmap.cpp +++ b/Libraries/LibDraw/GraphicsBitmap.cpp @@ -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) |