mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:07:46 +00:00
LibWeb: Remove glyph run allocation in paint_text_fragment()
Instead of allocating a new glyph run to scale glyph positions and fonts, a scale factor could be encoded in a paint command and applied later during command execution.
This commit is contained in:
parent
aeb5a0d9e8
commit
cf6999f5f3
11 changed files with 25 additions and 27 deletions
|
@ -13,7 +13,7 @@ namespace Web::Painting {
|
|||
|
||||
class CommandExecutorCPU : public CommandExecutor {
|
||||
public:
|
||||
CommandResult draw_glyph_run(Vector<Gfx::DrawGlyphOrEmoji> const& glyph_run, Color const&, Gfx::FloatPoint translation) override;
|
||||
CommandResult draw_glyph_run(Vector<Gfx::DrawGlyphOrEmoji> const& glyph_run, Color const&, Gfx::FloatPoint translation, double scale) override;
|
||||
CommandResult draw_text(Gfx::IntRect const& rect, String const& raw_text, Gfx::TextAlignment alignment, Color const&, Gfx::TextElision, Gfx::TextWrapping, Optional<NonnullRefPtr<Gfx::Font>> const&) override;
|
||||
CommandResult fill_rect(Gfx::IntRect const& rect, Color const&) override;
|
||||
CommandResult draw_scaled_bitmap(Gfx::IntRect const& dst_rect, Gfx::Bitmap const& bitmap, Gfx::IntRect const& src_rect, Gfx::Painter::ScalingMode scaling_mode) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue