From 88ca72aa79de8eb111c2148da7312dbea8ea4769 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sat, 15 Oct 2022 22:13:47 +0200 Subject: LibSoftGPU: Extract `argb32_color` value in rasterization This makes it easier to correlate slow instructions in the disassembly view of ProfileViewer. --- Userland/Libraries/LibSoftGPU/Device.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibSoftGPU') diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 1208369599..3bf6e7b296 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -515,10 +515,11 @@ ALWAYS_INLINE void Device::rasterize(Gfx::IntRect& render_bounds, CB1 set_covera quad.out_color = src * src_factor + dst * dst_factor; } + auto const argb32_color = to_argb32(quad.out_color); if (m_options.color_mask == 0xffffffff) - store4_masked(to_argb32(quad.out_color), color_ptrs[0], color_ptrs[1], color_ptrs[2], color_ptrs[3], quad.mask); + store4_masked(argb32_color, color_ptrs[0], color_ptrs[1], color_ptrs[2], color_ptrs[3], quad.mask); else - store4_masked((to_argb32(quad.out_color) & m_options.color_mask) | (dst_u32 & ~m_options.color_mask), color_ptrs[0], color_ptrs[1], color_ptrs[2], color_ptrs[3], quad.mask); + store4_masked((argb32_color & m_options.color_mask) | (dst_u32 & ~m_options.color_mask), color_ptrs[0], color_ptrs[1], color_ptrs[2], color_ptrs[3], quad.mask); } } } -- cgit v1.2.3