mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +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:
parent
79fd8eb28d
commit
aeb5a0d9e8
8 changed files with 21 additions and 16 deletions
|
@ -87,7 +87,7 @@ void CommandList::execute(CommandExecutor& executor)
|
|||
|
||||
auto result = command.visit(
|
||||
[&](DrawGlyphRun const& command) {
|
||||
return executor.draw_glyph_run(command.glyph_run, command.color);
|
||||
return executor.draw_glyph_run(command.glyph_run, command.color, command.translation);
|
||||
},
|
||||
[&](DrawText const& command) {
|
||||
return executor.draw_text(command.rect, command.raw_text, command.alignment, command.color,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue