mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
SharedGraphics: Don't eagerly commit mmap'ed font files in kernel.
Just let the page fault handler do its thing. Anytime we can avoid loading some pages from disk, that's a good thing.
This commit is contained in:
parent
b365ad4aef
commit
cb6e852620
Notes:
sideshowbarker
2024-07-19 15:49:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cb6e8526204
1 changed files with 0 additions and 4 deletions
|
@ -65,7 +65,6 @@ Font& Font::default_font()
|
|||
}
|
||||
auto* region = current->allocate_file_backed_region(LinearAddress(), font_file_size(10), descriptor->inode(), "default_font", /*readable*/true, /*writable*/false);
|
||||
ASSERT(region);
|
||||
region->page_in();
|
||||
s_default_font = Font::load_from_memory(region->laddr().as_ptr()).leak_ref();
|
||||
#endif
|
||||
ASSERT(s_default_font);
|
||||
|
@ -88,9 +87,6 @@ Font& Font::default_bold_font()
|
|||
}
|
||||
auto* region = current->allocate_file_backed_region(LinearAddress(), font_file_size(10), descriptor->inode(), "default_bold_font", /*readable*/true, /*writable*/false);
|
||||
ASSERT(region);
|
||||
ASSERT_INTERRUPTS_ENABLED();
|
||||
region->page_in();
|
||||
ASSERT_INTERRUPTS_ENABLED();
|
||||
s_default_bold_font = Font::load_from_memory(region->laddr().as_ptr()).leak_ref();
|
||||
#endif
|
||||
ASSERT(s_default_bold_font);
|
||||
|
|
Loading…
Add table
Reference in a new issue