mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibGUI: Improve visible glyph estimate in GlyphMapWidget
Previously the widget used a very rough estimate for visible glyphs based on viewport and glyph areas. Now it simply figures rows times columns with a two row overdraw to accommodate fractional glyphs on either end of visible content. For KaticaRegular10, this ends up reducing unnecessary glyph iterations during painting by about 30%.
This commit is contained in:
parent
e34503800c
commit
a98d5c52f8
Notes:
sideshowbarker
2024-07-17 07:25:39 +09:00
Author: https://github.com/thankyouverycool
Commit: a98d5c52f8
Pull-request: https://github.com/SerenityOS/serenity/pull/16566
2 changed files with 10 additions and 6 deletions
|
@ -100,6 +100,7 @@ private:
|
|||
int m_glyph_count { 0x110000 };
|
||||
int m_columns { 0 };
|
||||
int m_rows { 0 };
|
||||
int m_visible_rows { 0 };
|
||||
int m_horizontal_spacing { 4 };
|
||||
int m_vertical_spacing { 4 };
|
||||
Selection m_selection;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue