1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

LibGL: Always inline to_rgba32()

This function popped up in profiles.
This commit is contained in:
Jelle Raaijmakers 2021-11-29 11:55:23 +01:00 committed by Andreas Kling
parent 930782a155
commit 65cda8e4aa

View file

@ -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;