mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-24 19:21:52 +00:00
SharedGraphics: Allocate file-backed kernel GraphcisBitmaps in WindowServer.
This commit is contained in:
parent
004aad0995
commit
cda598c29c
Notes:
sideshowbarker
2024-07-19 15:49:37 +09:00
Author: https://github.com/awesomekling
Commit: cda598c29c
1 changed files with 1 additions and 2 deletions
|
@ -69,8 +69,7 @@ RetainPtr<GraphicsBitmap> GraphicsBitmap::load_from_file(const String& path, con
|
||||||
kprintf("Failed to load GraphicsBitmap from file (%s)\n", path.characters());
|
kprintf("Failed to load GraphicsBitmap from file (%s)\n", path.characters());
|
||||||
ASSERT_NOT_REACHED();
|
ASSERT_NOT_REACHED();
|
||||||
}
|
}
|
||||||
auto* region = current->allocate_file_backed_region(LinearAddress(), size.area() * 4, descriptor->inode(), ".rgb file", /*readable*/true, /*writable*/false);
|
auto* region = WSMessageLoop::the().server_process().allocate_file_backed_region(LinearAddress(), size.area() * 4, descriptor->inode(), ".rgb file", /*readable*/true, /*writable*/false);
|
||||||
region->page_in();
|
|
||||||
auto* mapped_file = (RGBA32*)region->laddr().get();
|
auto* mapped_file = (RGBA32*)region->laddr().get();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue