LibGfx: Use memcpy instead of fast_u32_copy for blitting

In some artificial full screen blitting profiling, I've seen `memcpy`
take up about 4% fewer samples each time I measure. It seems like
`fast_u32_copy` is not as fast as it'd like to believe.
This commit is contained in:
Jelle Raaijmakers 2022-09-14 14:29:27 +02:00 committed by Andreas Kling
parent 57ad99ef16
commit bfb4e08612

View file

@ -1066,7 +1066,7 @@ void Painter::blit(IntPoint const& position, Gfx::Bitmap const& source, IntRect
ARGB32 const* src = source.scanline(src_rect.top() + first_row) + src_rect.left() + first_column;
size_t const src_skip = source.pitch() / sizeof(ARGB32);
for (int row = first_row; row <= last_row; ++row) {
fast_u32_copy(dst, src, clipped_rect.width());
memcpy(dst, src, sizeof(ARGB32) * clipped_rect.width());
dst += dst_skip;
src += src_skip;
}