diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-24 18:31:59 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-25 14:39:21 +0200 |
commit | 24b5295b3038dc0b7a49367476b5b8594268163d (patch) | |
tree | 61a774f809502fef1e54fabbae6fc066b3523745 /Userland/Libraries/LibGfx/GIFLoader.cpp | |
parent | deec79b3c61b4444c54e0b159a517920ab841658 (diff) | |
download | serenity-24b5295b3038dc0b7a49367476b5b8594268163d.zip |
LibGfx: Remove "purgeable Gfx::Bitmap" as a separate concept
This was a really weird thing to begin with, purgeable bitmaps were
basically regular bitmaps without a physical memory reservation.
Since all the clients of this code ended up populating the bitmaps
with pixels immediately after allocating them anyway, there was no
need to avoid the reservation.
Instead, all Gfx::Bitmaps are now purgeable, in the sense that they
can be marked as volatile or non-volatile.
The only difference here is that allocation failure is surfaced when
we try to create the bitmap instead of during the handling of a
subsequent page fault.
Diffstat (limited to 'Userland/Libraries/LibGfx/GIFLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/GIFLoader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/GIFLoader.cpp b/Userland/Libraries/LibGfx/GIFLoader.cpp index 2db9ec6060..fa47e9a0f8 100644 --- a/Userland/Libraries/LibGfx/GIFLoader.cpp +++ b/Userland/Libraries/LibGfx/GIFLoader.cpp @@ -299,10 +299,10 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index) size_t start_frame = context.current_frame + 1; if (context.state < GIFLoadingContext::State::FrameComplete) { start_frame = 0; - context.frame_buffer = Bitmap::try_create_purgeable(BitmapFormat::BGRA8888, { context.logical_screen.width, context.logical_screen.height }); + context.frame_buffer = Bitmap::try_create(BitmapFormat::BGRA8888, { context.logical_screen.width, context.logical_screen.height }); if (!context.frame_buffer) return false; - context.prev_frame_buffer = Bitmap::try_create_purgeable(BitmapFormat::BGRA8888, { context.logical_screen.width, context.logical_screen.height }); + context.prev_frame_buffer = Bitmap::try_create(BitmapFormat::BGRA8888, { context.logical_screen.width, context.logical_screen.height }); if (!context.prev_frame_buffer) return false; } else if (frame_index < context.current_frame) { |