From ef1f54b6b0054bf51811b336d1a976e426b4e6f8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Wed, 19 Jun 2024 03:37:03 +0300 Subject: [PATCH] LibWeb: Accept value by reference in Skia type conversion helpers --- .../Libraries/LibWeb/Painting/CommandExecutorSkia.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.cpp b/Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.cpp index f08c0fdcfe4..77fe9b1eb8d 100644 --- a/Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.cpp +++ b/Userland/Libraries/LibWeb/Painting/CommandExecutorSkia.cpp @@ -39,17 +39,17 @@ private: sk_sp 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 subpath_start_point; Optional 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];