LibWeb: Remove the now-unused DrawText display list command

This commit is contained in:
Andreas Kling 2024-06-21 08:00:49 +02:00 committed by Andreas Kling
parent 63f8feb9a4
commit 23f6280817
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00
9 changed files with 0 additions and 37 deletions

View file

@ -49,19 +49,6 @@ struct DrawGlyphRun {
void translate_by(Gfx::IntPoint const& offset);
};
struct DrawText {
Gfx::IntRect rect;
String raw_text;
Gfx::TextAlignment alignment;
Color color;
Gfx::TextElision elision;
Gfx::TextWrapping wrapping;
NonnullRefPtr<Gfx::Font> font;
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
void translate_by(Gfx::IntPoint const& offset) { rect.translate_by(offset); }
};
struct FillRect {
Gfx::IntRect rect;
Color color;
@ -369,7 +356,6 @@ struct BlitCornerClipping {
using Command = Variant<
DrawGlyphRun,
DrawText,
FillRect,
DrawScaledBitmap,
DrawScaledImmutableBitmap,

View file

@ -47,13 +47,6 @@ CommandResult CommandExecutorCPU::draw_glyph_run(DrawGlyphRun const& command)
return CommandResult::Continue;
}
CommandResult CommandExecutorCPU::draw_text(DrawText const& command)
{
auto& painter = this->painter();
painter.draw_text(command.rect, command.raw_text, command.font, command.alignment, command.color, command.elision, command.wrapping);
return CommandResult::Continue;
}
template<typename Callback>
void apply_clip_paths_to_painter(Gfx::IntRect const& rect, Callback callback, Vector<Gfx::Path> const& clip_paths, Gfx::Painter& target_painter)
{

View file

@ -15,7 +15,6 @@ namespace Web::Painting {
class CommandExecutorCPU : public CommandExecutor {
public:
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
CommandResult draw_text(DrawText const&) override;
CommandResult fill_rect(FillRect const&) override;
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

View file

@ -48,12 +48,6 @@ CommandResult CommandExecutorGPU::draw_glyph_run(DrawGlyphRun const& command)
return CommandResult::Continue;
}
CommandResult CommandExecutorGPU::draw_text(DrawText const&)
{
// FIXME
return CommandResult::Continue;
}
CommandResult CommandExecutorGPU::fill_rect(FillRect const& command)
{
// FIXME: Support clip paths

View file

@ -15,7 +15,6 @@ namespace Web::Painting {
class CommandExecutorGPU : public CommandExecutor {
public:
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
CommandResult draw_text(DrawText const&) override;
CommandResult fill_rect(FillRect const&) override;
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

View file

@ -245,11 +245,6 @@ CommandResult CommandExecutorSkia::draw_glyph_run(DrawGlyphRun const& command)
return CommandResult::Continue;
}
CommandResult CommandExecutorSkia::draw_text(DrawText const&)
{
return CommandResult::Continue;
}
CommandResult CommandExecutorSkia::fill_rect(FillRect const& command)
{
APPLY_PATH_CLIP_IF_NEEDED

View file

@ -14,7 +14,6 @@ namespace Web::Painting {
class CommandExecutorSkia : public CommandExecutor {
public:
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
CommandResult draw_text(DrawText const&) override;
CommandResult fill_rect(FillRect const&) override;
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

View file

@ -148,7 +148,6 @@ void CommandList::execute(CommandExecutor& executor)
// clang-format off
CommandResult result;
HANDLE_COMMAND(DrawGlyphRun, draw_glyph_run)
else HANDLE_COMMAND(DrawText, draw_text)
else HANDLE_COMMAND(FillRect, fill_rect)
else HANDLE_COMMAND(DrawScaledBitmap, draw_scaled_bitmap)
else HANDLE_COMMAND(DrawScaledImmutableBitmap, draw_scaled_immutable_bitmap)

View file

@ -46,7 +46,6 @@ public:
virtual ~CommandExecutor() = default;
virtual CommandResult draw_glyph_run(DrawGlyphRun const&) = 0;
virtual CommandResult draw_text(DrawText const&) = 0;
virtual CommandResult fill_rect(FillRect const&) = 0;
virtual CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) = 0;
virtual CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) = 0;