1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

LibWeb: Remove wrappers for gradient painting command recording

These were adding unnecessary indirection, whereas recording painter
could be called directly.
This commit is contained in:
Aliaksandr Kalenik 2024-03-03 15:49:53 +01:00 committed by Alexander Kalenik
parent c6b484a728
commit ee1d8a534d
5 changed files with 7 additions and 25 deletions

View file

@ -45,7 +45,9 @@ void ConicGradientStyleValue::resolve_for_size(Layout::NodeWithStyleAndBoxModelM
void ConicGradientStyleValue::paint(PaintContext& context, DevicePixelRect const& dest_rect, CSS::ImageRendering, Vector<Gfx::Path> const& clip_paths) const
{
VERIFY(m_resolved.has_value());
Painting::paint_conic_gradient(context, dest_rect, m_resolved->data, context.rounded_device_point(m_resolved->position), clip_paths);
auto destination_rect = dest_rect.to_type<int>();
auto position = context.rounded_device_point(m_resolved->position).to_type<int>();
context.recording_painter().fill_rect_with_conic_gradient(destination_rect, m_resolved->data, position, clip_paths);
}
bool ConicGradientStyleValue::equals(StyleValue const& other) const