mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGfx: Move to_skia_cap, to_skia_join to SkiaUtils
This commit is contained in:
parent
23151de217
commit
12968ff025
Notes:
github-actions[bot]
2025-03-15 13:03:33 +00:00
Author: https://github.com/mehrankamal
Commit: 12968ff025
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3944
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/nico ✅
2 changed files with 27 additions and 26 deletions
|
@ -651,32 +651,6 @@ void DisplayListPlayerSkia::fill_path_using_paint_style(FillPathUsingPaintStyle
|
|||
surface().canvas().drawPath(path, paint);
|
||||
}
|
||||
|
||||
static SkPaint::Cap to_skia_cap(Gfx::Path::CapStyle const& cap_style)
|
||||
{
|
||||
switch (cap_style) {
|
||||
case Gfx::Path::CapStyle::Butt:
|
||||
return SkPaint::kButt_Cap;
|
||||
case Gfx::Path::CapStyle::Round:
|
||||
return SkPaint::kRound_Cap;
|
||||
case Gfx::Path::CapStyle::Square:
|
||||
return SkPaint::kSquare_Cap;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
static SkPaint::Join to_skia_join(Gfx::Path::JoinStyle const& join_style)
|
||||
{
|
||||
switch (join_style) {
|
||||
case Gfx::Path::JoinStyle::Round:
|
||||
return SkPaint::kRound_Join;
|
||||
case Gfx::Path::JoinStyle::Bevel:
|
||||
return SkPaint::kBevel_Join;
|
||||
case Gfx::Path::JoinStyle::Miter:
|
||||
return SkPaint::kMiter_Join;
|
||||
}
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
void DisplayListPlayerSkia::stroke_path_using_color(StrokePathUsingColor const& command)
|
||||
{
|
||||
// Skia treats zero thickness as a special case and will draw a hairline, while we want to draw nothing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue