mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-10 03:26:10 +00:00
LibGL: Always inline to_rgba32()
This function popped up in profiles.
This commit is contained in:
parent
930782a155
commit
65cda8e4aa
Notes:
sideshowbarker
2024-07-17 22:57:24 +09:00
Author: https://github.com/gmta
Commit: 65cda8e4aa
Pull-request: https://github.com/SerenityOS/serenity/pull/11108
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/sunverwerth ✅
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue