From 65cda8e4aa3a54dd56def333d6d03b92afbf18af Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Mon, 29 Nov 2021 11:55:23 +0100 Subject: [PATCH] LibGL: Always inline `to_rgba32()` This function popped up in profiles. --- Userland/Libraries/LibGL/SoftwareRasterizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGL/SoftwareRasterizer.cpp b/Userland/Libraries/LibGL/SoftwareRasterizer.cpp index 437697f5d0..ca64fe82d0 100644 --- a/Userland/Libraries/LibGL/SoftwareRasterizer.cpp +++ b/Userland/Libraries/LibGL/SoftwareRasterizer.cpp @@ -34,7 +34,7 @@ constexpr static T mix(const T& x, const T& y, float interp) return x * (1 - interp) + y * interp; } -static Gfx::RGBA32 to_rgba32(const FloatVector4& v) +ALWAYS_INLINE constexpr static Gfx::RGBA32 to_rgba32(const FloatVector4& v) { auto clamped = v.clamped(0, 1); u8 r = clamped.x() * 255;