mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:57:36 +00:00
LibWeb: Introduce dedicated painting command for borders
Currently, in CPU painter, border painting is implemented by building a Gfx::Path that is filled by Gfx::AntiAliasingPainter. In the GPU painter, we will likely want to do something different, and with a special command, it becomes possible. Also, by making this change, the CPU executor also benefits because now we can skip building paths for borders that are out of the viewport.
This commit is contained in:
parent
70353b79af
commit
29ff1f67be
11 changed files with 50 additions and 12 deletions
|
@ -28,8 +28,8 @@ enum class BorderEdge {
|
|||
// Returns OptionalNone if there is no outline to paint.
|
||||
Optional<BordersData> borders_data_for_outline(Layout::Node const&, Color outline_color, CSS::OutlineStyle outline_style, CSSPixels outline_width);
|
||||
|
||||
void paint_border(RecordingPainter& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last);
|
||||
void paint_all_borders(RecordingPainter& context, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&);
|
||||
void paint_border(Gfx::Painter& painter, BorderEdge edge, DevicePixelRect const& rect, Gfx::AntiAliasingPainter::CornerRadius const& radius, Gfx::AntiAliasingPainter::CornerRadius const& opposite_radius, BordersDataDevicePixels const& borders_data, Gfx::Path& path, bool last);
|
||||
void paint_all_borders(Gfx::Painter& painter, DevicePixelRect const& border_rect, CornerRadii const& corner_radii, BordersDataDevicePixels const&);
|
||||
|
||||
Gfx::Color border_color(BorderEdge edge, BordersDataDevicePixels const& borders_data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue