mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +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:
parent
cf6999f5f3
commit
06c176bbfb
9 changed files with 32 additions and 15 deletions
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
CSSPixelRect const absolute_rect() const;
|
||||
|
||||
Vector<Gfx::DrawGlyphOrEmoji> const& glyph_run() const { return m_glyph_run; }
|
||||
Gfx::GlyphRun const& glyph_run() const { return *m_glyph_run; }
|
||||
|
||||
CSSPixelRect selection_rect(Gfx::Font const&) const;
|
||||
|
||||
|
@ -55,7 +55,7 @@ private:
|
|||
int m_start;
|
||||
int m_length;
|
||||
Painting::BorderRadiiData m_border_radii_data;
|
||||
Vector<Gfx::DrawGlyphOrEmoji> m_glyph_run;
|
||||
NonnullRefPtr<Gfx::GlyphRun> m_glyph_run;
|
||||
Vector<ShadowData> m_shadows;
|
||||
bool m_contained_by_inline_node { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue