1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibWeb: Remove glyph run allocation in RecordingPainter::draw_text_run

Instead of allocating a new glyph run solely to shift each glyph by the
painter's offset, this offset could be encoded in a paint command and
applied later during command execution.
This commit is contained in:
Aliaksandr Kalenik 2024-03-01 13:22:35 +01:00 committed by Andreas Kling
parent 79fd8eb28d
commit aeb5a0d9e8
8 changed files with 21 additions and 16 deletions

View file

@ -41,6 +41,7 @@ struct DrawGlyphRun {
Vector<Gfx::DrawGlyphOrEmoji> glyph_run;
Color color;
Gfx::IntRect rect;
Gfx::FloatPoint translation;
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }