mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 20:42:21 +00:00
LibWeb: Remove unused blend mode param in FillEllipse painting command
This commit is contained in:
parent
d3cfe35fbd
commit
cedf6dd2c3
Notes:
sideshowbarker
2024-07-17 01:55:29 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: cedf6dd2c3
Pull-request: https://github.com/SerenityOS/serenity/pull/24037
9 changed files with 9 additions and 11 deletions
|
@ -261,7 +261,6 @@ struct DrawEllipse {
|
||||||
struct FillEllipse {
|
struct FillEllipse {
|
||||||
Gfx::IntRect rect;
|
Gfx::IntRect rect;
|
||||||
Color color;
|
Color color;
|
||||||
Gfx::AntiAliasingPainter::BlendMode blend_mode;
|
|
||||||
|
|
||||||
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
|
[[nodiscard]] Gfx::IntRect bounding_rect() const { return rect; }
|
||||||
|
|
||||||
|
|
|
@ -354,10 +354,10 @@ CommandResult CommandExecutorCPU::draw_ellipse(Gfx::IntRect const& rect, Color c
|
||||||
return CommandResult::Continue;
|
return CommandResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandResult CommandExecutorCPU::fill_ellipse(Gfx::IntRect const& rect, Color const& color, Gfx::AntiAliasingPainter::BlendMode blend_mode)
|
CommandResult CommandExecutorCPU::fill_ellipse(Gfx::IntRect const& rect, Color const& color)
|
||||||
{
|
{
|
||||||
Gfx::AntiAliasingPainter aa_painter(painter());
|
Gfx::AntiAliasingPainter aa_painter(painter());
|
||||||
aa_painter.fill_ellipse(rect, color, blend_mode);
|
aa_painter.fill_ellipse(rect, color);
|
||||||
return CommandResult::Continue;
|
return CommandResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ public:
|
||||||
CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) override;
|
CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) override;
|
||||||
CommandResult stroke_path_using_paint_style(Gfx::Path const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) override;
|
CommandResult stroke_path_using_paint_style(Gfx::Path const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) override;
|
||||||
CommandResult draw_ellipse(Gfx::IntRect const& rect, Color const& color, int thickness) override;
|
CommandResult draw_ellipse(Gfx::IntRect const& rect, Color const& color, int thickness) override;
|
||||||
CommandResult fill_ellipse(Gfx::IntRect const& rect, Color const& color, Gfx::AntiAliasingPainter::BlendMode blend_mode) override;
|
CommandResult fill_ellipse(Gfx::IntRect const& rect, Color const& color) override;
|
||||||
CommandResult draw_line(Color const&, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle style, Color const& alternate_color) override;
|
CommandResult draw_line(Color const&, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle style, Color const& alternate_color) override;
|
||||||
CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const& sdf, float smoothing) override;
|
CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const& sdf, float smoothing) override;
|
||||||
CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) override;
|
CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) override;
|
||||||
|
|
|
@ -246,7 +246,7 @@ CommandResult CommandExecutorGPU::draw_ellipse(Gfx::IntRect const&, Color const&
|
||||||
return CommandResult::Continue;
|
return CommandResult::Continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandResult CommandExecutorGPU::fill_ellipse(Gfx::IntRect const& rect, Color const& color, Gfx::AntiAliasingPainter::BlendMode)
|
CommandResult CommandExecutorGPU::fill_ellipse(Gfx::IntRect const& rect, Color const& color)
|
||||||
{
|
{
|
||||||
auto horizontal_radius = static_cast<float>(rect.width() / 2);
|
auto horizontal_radius = static_cast<float>(rect.width() / 2);
|
||||||
auto vertical_radius = static_cast<float>(rect.height() / 2);
|
auto vertical_radius = static_cast<float>(rect.height() / 2);
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) override;
|
CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) override;
|
||||||
CommandResult stroke_path_using_paint_style(Gfx::Path const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) override;
|
CommandResult stroke_path_using_paint_style(Gfx::Path const& path, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) override;
|
||||||
CommandResult draw_ellipse(Gfx::IntRect const& rect, Color const& color, int thickness) override;
|
CommandResult draw_ellipse(Gfx::IntRect const& rect, Color const& color, int thickness) override;
|
||||||
CommandResult fill_ellipse(Gfx::IntRect const& rect, Color const& color, Gfx::AntiAliasingPainter::BlendMode blend_mode) override;
|
CommandResult fill_ellipse(Gfx::IntRect const& rect, Color const& color) override;
|
||||||
CommandResult draw_line(Color const&, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle style, Color const& alternate_color) override;
|
CommandResult draw_line(Color const&, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle style, Color const& alternate_color) override;
|
||||||
CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const& sdf, float smoothing) override;
|
CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const& sdf, float smoothing) override;
|
||||||
CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) override;
|
CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) override;
|
||||||
|
|
|
@ -173,7 +173,7 @@ void CommandList::execute(CommandExecutor& executor)
|
||||||
return executor.draw_ellipse(command.rect, command.color, command.thickness);
|
return executor.draw_ellipse(command.rect, command.color, command.thickness);
|
||||||
},
|
},
|
||||||
[&](FillEllipse const& command) {
|
[&](FillEllipse const& command) {
|
||||||
return executor.fill_ellipse(command.rect, command.color, command.blend_mode);
|
return executor.fill_ellipse(command.rect, command.color);
|
||||||
},
|
},
|
||||||
[&](DrawLine const& command) {
|
[&](DrawLine const& command) {
|
||||||
return executor.draw_line(command.color, command.from, command.to, command.thickness,
|
return executor.draw_line(command.color, command.from, command.to, command.thickness,
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
virtual CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) = 0;
|
virtual CommandResult stroke_path_using_color(Gfx::Path const&, Color const& color, float thickness, Gfx::FloatPoint const& aa_translation) = 0;
|
||||||
virtual CommandResult stroke_path_using_paint_style(Gfx::Path const&, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) = 0;
|
virtual CommandResult stroke_path_using_paint_style(Gfx::Path const&, Gfx::PaintStyle const& paint_style, float thickness, float opacity, Gfx::FloatPoint const& aa_translation) = 0;
|
||||||
virtual CommandResult draw_ellipse(Gfx::IntRect const&, Color const&, int thickness) = 0;
|
virtual CommandResult draw_ellipse(Gfx::IntRect const&, Color const&, int thickness) = 0;
|
||||||
virtual CommandResult fill_ellipse(Gfx::IntRect const&, Color const&, Gfx::AntiAliasingPainter::BlendMode blend_mode) = 0;
|
virtual CommandResult fill_ellipse(Gfx::IntRect const&, Color const&) = 0;
|
||||||
virtual CommandResult draw_line(Color const& color, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle, Color const& alternate_color) = 0;
|
virtual CommandResult draw_line(Color const& color, Gfx::IntPoint const& from, Gfx::IntPoint const& to, int thickness, Gfx::Painter::LineStyle, Color const& alternate_color) = 0;
|
||||||
virtual CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const&, float smoothing) = 0;
|
virtual CommandResult draw_signed_distance_field(Gfx::IntRect const& rect, Color const&, Gfx::GrayscaleBitmap const&, float smoothing) = 0;
|
||||||
virtual CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) = 0;
|
virtual CommandResult apply_backdrop_filter(Gfx::IntRect const& backdrop_region, Web::CSS::ResolvedBackdropFilter const& backdrop_filter) = 0;
|
||||||
|
|
|
@ -110,12 +110,11 @@ void RecordingPainter::draw_ellipse(Gfx::IntRect const& a_rect, Color color, int
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecordingPainter::fill_ellipse(Gfx::IntRect const& a_rect, Color color, Gfx::AntiAliasingPainter::BlendMode blend_mode)
|
void RecordingPainter::fill_ellipse(Gfx::IntRect const& a_rect, Color color)
|
||||||
{
|
{
|
||||||
append(FillEllipse {
|
append(FillEllipse {
|
||||||
.rect = state().translation.map(a_rect),
|
.rect = state().translation.map(a_rect),
|
||||||
.color = color,
|
.color = color,
|
||||||
.blend_mode = blend_mode,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public:
|
||||||
|
|
||||||
void draw_ellipse(Gfx::IntRect const& a_rect, Color color, int thickness);
|
void draw_ellipse(Gfx::IntRect const& a_rect, Color color, int thickness);
|
||||||
|
|
||||||
void fill_ellipse(Gfx::IntRect const& a_rect, Color color, Gfx::AntiAliasingPainter::BlendMode blend_mode = Gfx::AntiAliasingPainter::BlendMode::Normal);
|
void fill_ellipse(Gfx::IntRect const& a_rect, Color color);
|
||||||
|
|
||||||
void fill_rect_with_linear_gradient(Gfx::IntRect const& gradient_rect, LinearGradientData const& data, Vector<Gfx::Path> const& clip_paths = {});
|
void fill_rect_with_linear_gradient(Gfx::IntRect const& gradient_rect, LinearGradientData const& data, Vector<Gfx::Path> const& clip_paths = {});
|
||||||
void fill_rect_with_conic_gradient(Gfx::IntRect const& rect, ConicGradientData const& data, Gfx::IntPoint const& position, Vector<Gfx::Path> const& clip_paths = {});
|
void fill_rect_with_conic_gradient(Gfx::IntRect const& rect, ConicGradientData const& data, Gfx::IntPoint const& position, Vector<Gfx::Path> const& clip_paths = {});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue