blit: Blit::blend_xrgb_a

This commit adds support for SIMD-based alpha blending, which speeds up
the alpha-compositing of the nitpicker GUI server by circa 300% on ARM
Neon and x86_64 using SSE4.1

Issue #5428
This commit is contained in:
Norman Feske
2025-01-25 13:08:37 +01:00
committed by Christian Helmuth
parent 19717ab74e
commit 21acbed65b
7 changed files with 347 additions and 4 deletions

View File

@ -57,6 +57,15 @@ namespace Blit {
{
_b2f<Slow>(surface, texture, rect, rotate, flip);
}
/**
* Blend a sequence of pixels to 'dst' according to discrete alpha values
*/
static inline void blend_xrgb_a(uint32_t *dst, unsigned n,
uint32_t const *pixel, uint8_t const *alpha)
{
Slow::Blend::xrgb_a(dst, n, pixel, alpha);
}
}
#endif /* _INCLUDE__BLIT_H_ */