summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/DDSLoader.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-24 22:49:48 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-25 14:39:25 +0200
commit143443e0b6412cd7f5a702e5b190bea60da733fe (patch)
tree5d1490936ab7a056db804c4ba5ffd22558afa429 /Userland/Libraries/LibGfx/DDSLoader.h
parent24b5295b3038dc0b7a49367476b5b8594268163d (diff)
downloadserenity-143443e0b6412cd7f5a702e5b190bea60da733fe.zip
LibGfx: Make Gfx::Bitmap::set_nonvolatile() report allocation failure
Making a bitmap non-volatile after being volatile may fail to allocate physical pages after the kernel stole the old pages in a purge. This is different from the pages being purged, but reallocated. In that case, they are simply replaced with zero-fill-on-demand pages as if they were freshly allocated.
Diffstat (limited to 'Userland/Libraries/LibGfx/DDSLoader.h')
-rw-r--r--Userland/Libraries/LibGfx/DDSLoader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/DDSLoader.h b/Userland/Libraries/LibGfx/DDSLoader.h
index 8b5eab464b..4179a956d1 100644
--- a/Userland/Libraries/LibGfx/DDSLoader.h
+++ b/Userland/Libraries/LibGfx/DDSLoader.h
@@ -245,7 +245,7 @@ public:
virtual IntSize size() override;
virtual RefPtr<Gfx::Bitmap> bitmap() override;
virtual void set_volatile() override;
- [[nodiscard]] virtual bool set_nonvolatile() override;
+ [[nodiscard]] virtual bool set_nonvolatile(bool& was_purged) override;
virtual bool sniff() override;
virtual bool is_animated() override;
virtual size_t loop_count() override;