Skip to content

Commit 23f6280

Browse files
committed
LibWeb: Remove the now-unused DrawText display list command
1 parent 63f8feb commit 23f6280

File tree

9 files changed

+0
-37
lines changed

9 files changed

+0
-37
lines changed

Userland/Libraries/LibWeb/Painting/Command.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,6 @@ struct DrawGlyphRun {
4949
void translate_by(Gfx::IntPoint const& offset);
5050
};
5151

52-
struct DrawText {
53-
Gfx::IntRect rect;
54-
String raw_text;
55-
Gfx::TextAlignment alignment;
56-
Color color;
57-
Gfx::TextElision elision;
58-
Gfx::TextWrapping wrapping;
59-
NonnullRefPtr<Gfx::Font> font;
60-
61-
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
62-
void translate_by(Gfx::IntPoint const& offset) { rect.translate_by(offset); }
63-
};
64-
6552
struct FillRect {
6653
Gfx::IntRect rect;
6754
Color color;
@@ -369,7 +356,6 @@ struct BlitCornerClipping {
369356

370357
using Command = Variant<
371358
DrawGlyphRun,
372-
DrawText,
373359
FillRect,
374360
DrawScaledBitmap,
375361
DrawScaledImmutableBitmap,

Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ CommandResult CommandExecutorCPU::draw_glyph_run(DrawGlyphRun const& command)
4747
return CommandResult::Continue;
4848
}
4949

50-
CommandResult CommandExecutorCPU::draw_text(DrawText const& command)
51-
{
52-
auto& painter = this->painter();
53-
painter.draw_text(command.rect, command.raw_text, command.font, command.alignment, command.color, command.elision, command.wrapping);
54-
return CommandResult::Continue;
55-
}
56-
5750
template<typename Callback>
5851
void apply_clip_paths_to_painter(Gfx::IntRect const& rect, Callback callback, Vector<Gfx::Path> const& clip_paths, Gfx::Painter& target_painter)
5952
{

Userland/Libraries/LibWeb/Painting/CommandExecutorCPU.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace Web::Painting {
1515
class CommandExecutorCPU : public CommandExecutor {
1616
public:
1717
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
18-
CommandResult draw_text(DrawText const&) override;
1918
CommandResult fill_rect(FillRect const&) override;
2019
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
2120
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

Userland/Libraries/LibWeb/Painting/CommandExecutorGPU.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ CommandResult CommandExecutorGPU::draw_glyph_run(DrawGlyphRun const& command)
4848
return CommandResult::Continue;
4949
}
5050

51-
CommandResult CommandExecutorGPU::draw_text(DrawText const&)
52-
{
53-
// FIXME
54-
return CommandResult::Continue;
55-
}
56-
5751
CommandResult CommandExecutorGPU::fill_rect(FillRect const& command)
5852
{
5953
// FIXME: Support clip paths

Userland/Libraries/LibWeb/Painting/CommandExecutorGPU.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ namespace Web::Painting {
1515
class CommandExecutorGPU : public CommandExecutor {
1616
public:
1717
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
18-
CommandResult draw_text(DrawText const&) override;
1918
CommandResult fill_rect(FillRect const&) override;
2019
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
2120
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,6 @@ CommandResult CommandExecutorSkia::draw_glyph_run(DrawGlyphRun const& command)
245245
return CommandResult::Continue;
246246
}
247247

248-
CommandResult CommandExecutorSkia::draw_text(DrawText const&)
249-
{
250-
return CommandResult::Continue;
251-
}
252-
253248
CommandResult CommandExecutorSkia::fill_rect(FillRect const& command)
254249
{
255250
APPLY_PATH_CLIP_IF_NEEDED

Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ namespace Web::Painting {
1414
class CommandExecutorSkia : public CommandExecutor {
1515
public:
1616
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
17-
CommandResult draw_text(DrawText const&) override;
1817
CommandResult fill_rect(FillRect const&) override;
1918
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
2019
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;

Userland/Libraries/LibWeb/Painting/CommandList.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ void CommandList::execute(CommandExecutor& executor)
148148
// clang-format off
149149
CommandResult result;
150150
HANDLE_COMMAND(DrawGlyphRun, draw_glyph_run)
151-
else HANDLE_COMMAND(DrawText, draw_text)
152151
else HANDLE_COMMAND(FillRect, fill_rect)
153152
else HANDLE_COMMAND(DrawScaledBitmap, draw_scaled_bitmap)
154153
else HANDLE_COMMAND(DrawScaledImmutableBitmap, draw_scaled_immutable_bitmap)

Userland/Libraries/LibWeb/Painting/CommandList.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class CommandExecutor {
4646
virtual ~CommandExecutor() = default;
4747

4848
virtual CommandResult draw_glyph_run(DrawGlyphRun const&) = 0;
49-
virtual CommandResult draw_text(DrawText const&) = 0;
5049
virtual CommandResult fill_rect(FillRect const&) = 0;
5150
virtual CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) = 0;
5251
virtual CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) = 0;

0 commit comments

Comments
 (0)