summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSoftGPU
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-10-15 22:13:47 +0200
committerLinus Groh <mail@linusgroh.de>2022-10-19 22:22:58 +0200
commit88ca72aa79de8eb111c2148da7312dbea8ea4769 (patch)
treef88124aea32d2afd5aa119f209578fc092151ff6 /Userland/Libraries/LibSoftGPU
parent681695a07a397c9713c40ccf53dde515a2a4df70 (diff)
downloadserenity-88ca72aa79de8eb111c2148da7312dbea8ea4769.zip
LibSoftGPU: Extract `argb32_color` value in rasterization
This makes it easier to correlate slow instructions in the disassembly view of ProfileViewer.
Diffstat (limited to 'Userland/Libraries/LibSoftGPU')
-rw-r--r--Userland/Libraries/LibSoftGPU/Device.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}
}
}