mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
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:
parent
57ad99ef16
commit
bfb4e08612
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue