mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
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.
This commit is contained in:
parent
24b5295b30
commit
143443e0b6
Notes:
sideshowbarker
2024-07-18 08:22:11 +09:00
Author: https://github.com/awesomekling
Commit: 143443e0b6
23 changed files with 57 additions and 46 deletions
|
@ -25,7 +25,7 @@ public:
|
|||
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue