mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 22:29:10 +00:00
LibWeb: Remove the now-unused DrawText display list command
This commit is contained in:
parent
63f8feb9a4
commit
23f6280817
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/awesomekling
Commit: 23f6280817
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/229
9 changed files with 0 additions and 37 deletions
|
@ -49,19 +49,6 @@ struct DrawGlyphRun {
|
||||||
void translate_by(Gfx::IntPoint const& offset);
|
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 {
|
struct FillRect {
|
||||||
Gfx::IntRect rect;
|
Gfx::IntRect rect;
|
||||||
Color color;
|
Color color;
|
||||||
|
@ -369,7 +356,6 @@ struct BlitCornerClipping {
|
||||||
|
|
||||||
using Command = Variant<
|
using Command = Variant<
|
||||||
DrawGlyphRun,
|
DrawGlyphRun,
|
||||||
DrawText,
|
|
||||||
FillRect,
|
FillRect,
|
||||||
DrawScaledBitmap,
|
DrawScaledBitmap,
|
||||||
DrawScaledImmutableBitmap,
|
DrawScaledImmutableBitmap,
|
||||||
|
|
|
@ -47,13 +47,6 @@ CommandResult CommandExecutorCPU::draw_glyph_run(DrawGlyphRun const& command)
|
||||||
return CommandResult::Continue;
|
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>
|
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)
|
void apply_clip_paths_to_painter(Gfx::IntRect const& rect, Callback callback, Vector<Gfx::Path> const& clip_paths, Gfx::Painter& target_painter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace Web::Painting {
|
||||||
class CommandExecutorCPU : public CommandExecutor {
|
class CommandExecutorCPU : public CommandExecutor {
|
||||||
public:
|
public:
|
||||||
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
||||||
CommandResult draw_text(DrawText const&) override;
|
|
||||||
CommandResult fill_rect(FillRect const&) override;
|
CommandResult fill_rect(FillRect const&) override;
|
||||||
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
||||||
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
||||||
|
|
|
@ -48,12 +48,6 @@ CommandResult CommandExecutorGPU::draw_glyph_run(DrawGlyphRun const& command)
|
||||||
return CommandResult::Continue;
|
return CommandResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandResult CommandExecutorGPU::draw_text(DrawText const&)
|
|
||||||
{
|
|
||||||
// FIXME
|
|
||||||
return CommandResult::Continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandResult CommandExecutorGPU::fill_rect(FillRect const& command)
|
CommandResult CommandExecutorGPU::fill_rect(FillRect const& command)
|
||||||
{
|
{
|
||||||
// FIXME: Support clip paths
|
// FIXME: Support clip paths
|
||||||
|
|
|
@ -15,7 +15,6 @@ namespace Web::Painting {
|
||||||
class CommandExecutorGPU : public CommandExecutor {
|
class CommandExecutorGPU : public CommandExecutor {
|
||||||
public:
|
public:
|
||||||
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
||||||
CommandResult draw_text(DrawText const&) override;
|
|
||||||
CommandResult fill_rect(FillRect const&) override;
|
CommandResult fill_rect(FillRect const&) override;
|
||||||
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
||||||
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
||||||
|
|
|
@ -245,11 +245,6 @@ CommandResult CommandExecutorSkia::draw_glyph_run(DrawGlyphRun const& command)
|
||||||
return CommandResult::Continue;
|
return CommandResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandResult CommandExecutorSkia::draw_text(DrawText const&)
|
|
||||||
{
|
|
||||||
return CommandResult::Continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandResult CommandExecutorSkia::fill_rect(FillRect const& command)
|
CommandResult CommandExecutorSkia::fill_rect(FillRect const& command)
|
||||||
{
|
{
|
||||||
APPLY_PATH_CLIP_IF_NEEDED
|
APPLY_PATH_CLIP_IF_NEEDED
|
||||||
|
|
|
@ -14,7 +14,6 @@ namespace Web::Painting {
|
||||||
class CommandExecutorSkia : public CommandExecutor {
|
class CommandExecutorSkia : public CommandExecutor {
|
||||||
public:
|
public:
|
||||||
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
CommandResult draw_glyph_run(DrawGlyphRun const&) override;
|
||||||
CommandResult draw_text(DrawText const&) override;
|
|
||||||
CommandResult fill_rect(FillRect const&) override;
|
CommandResult fill_rect(FillRect const&) override;
|
||||||
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) override;
|
||||||
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) override;
|
||||||
|
|
|
@ -148,7 +148,6 @@ void CommandList::execute(CommandExecutor& executor)
|
||||||
// clang-format off
|
// clang-format off
|
||||||
CommandResult result;
|
CommandResult result;
|
||||||
HANDLE_COMMAND(DrawGlyphRun, draw_glyph_run)
|
HANDLE_COMMAND(DrawGlyphRun, draw_glyph_run)
|
||||||
else HANDLE_COMMAND(DrawText, draw_text)
|
|
||||||
else HANDLE_COMMAND(FillRect, fill_rect)
|
else HANDLE_COMMAND(FillRect, fill_rect)
|
||||||
else HANDLE_COMMAND(DrawScaledBitmap, draw_scaled_bitmap)
|
else HANDLE_COMMAND(DrawScaledBitmap, draw_scaled_bitmap)
|
||||||
else HANDLE_COMMAND(DrawScaledImmutableBitmap, draw_scaled_immutable_bitmap)
|
else HANDLE_COMMAND(DrawScaledImmutableBitmap, draw_scaled_immutable_bitmap)
|
||||||
|
|
|
@ -46,7 +46,6 @@ public:
|
||||||
virtual ~CommandExecutor() = default;
|
virtual ~CommandExecutor() = default;
|
||||||
|
|
||||||
virtual CommandResult draw_glyph_run(DrawGlyphRun const&) = 0;
|
virtual CommandResult draw_glyph_run(DrawGlyphRun const&) = 0;
|
||||||
virtual CommandResult draw_text(DrawText const&) = 0;
|
|
||||||
virtual CommandResult fill_rect(FillRect const&) = 0;
|
virtual CommandResult fill_rect(FillRect const&) = 0;
|
||||||
virtual CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) = 0;
|
virtual CommandResult draw_scaled_bitmap(DrawScaledBitmap const&) = 0;
|
||||||
virtual CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) = 0;
|
virtual CommandResult draw_scaled_immutable_bitmap(DrawScaledImmutableBitmap const&) = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue