1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:47:35 +00:00

LibGfx+LibWeb: Use ref-counted object to store glyph run

...to avoid allocating a copy of glyph run for painting commands. We
can't simply save pointers to a glyph run in layout/paintable tree
because it should be safe to deallocate layout and paintable trees
after painting commands are recorded, if in the future we decide to
move command execution to a separate thread.
This commit is contained in:
Aliaksandr Kalenik 2024-03-01 16:37:44 +01:00 committed by Andreas Kling
parent cf6999f5f3
commit 06c176bbfb
9 changed files with 32 additions and 15 deletions

View file

@ -38,7 +38,7 @@
namespace Web::Painting {
struct DrawGlyphRun {
Vector<Gfx::DrawGlyphOrEmoji> glyph_run;
NonnullRefPtr<Gfx::GlyphRun> glyph_run;
Color color;
Gfx::IntRect rect;
Gfx::FloatPoint translation;