mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibWeb: Accept value by reference in Skia type conversion helpers
This commit is contained in:
parent
8f721e5b1a
commit
ef1f54b6b0
Notes:
sideshowbarker
2024-07-17 01:23:08 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/ef1f54b6b0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/204
1 changed files with 4 additions and 4 deletions
|
@ -39,17 +39,17 @@ private:
|
|||
sk_sp<SkSurface> surface;
|
||||
};
|
||||
|
||||
static SkRect to_skia_rect(auto rect)
|
||||
static SkRect to_skia_rect(auto const& rect)
|
||||
{
|
||||
return SkRect::MakeXYWH(rect.x(), rect.y(), rect.width(), rect.height());
|
||||
}
|
||||
|
||||
static SkColor to_skia_color(Gfx::Color color)
|
||||
static SkColor to_skia_color(Gfx::Color const& color)
|
||||
{
|
||||
return SkColorSetARGB(color.alpha(), color.red(), color.green(), color.blue());
|
||||
}
|
||||
|
||||
static SkPath to_skia_path(Gfx::Path path)
|
||||
static SkPath to_skia_path(Gfx::Path const& path)
|
||||
{
|
||||
Optional<Gfx::FloatPoint> subpath_start_point;
|
||||
Optional<Gfx::FloatPoint> subpath_last_point;
|
||||
|
@ -102,7 +102,7 @@ static SkPath to_skia_path(Gfx::Path path)
|
|||
return path_builder.snapshot();
|
||||
}
|
||||
|
||||
static SkRRect to_skia_rrect(auto rect, CornerRadii corner_radii)
|
||||
static SkRRect to_skia_rrect(auto const& rect, CornerRadii const& corner_radii)
|
||||
{
|
||||
SkRRect rrect;
|
||||
SkVector radii[4];
|
||||
|
|
Loading…
Reference in a new issue