瀏覽代碼

LibGL: Always inline `to_rgba32()`

This function popped up in profiles.
Jelle Raaijmakers 3 年之前
父節點
當前提交
65cda8e4aa
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibGL/SoftwareRasterizer.cpp

+ 1 - 1
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;
     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);
     auto clamped = v.clamped(0, 1);
     u8 r = clamped.x() * 255;
     u8 r = clamped.x() * 255;