mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +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
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
ARGB32 const* src = source.scanline(src_rect.top() + first_row) + src_rect.left() + first_column;
|
||||||
size_t const src_skip = source.pitch() / sizeof(ARGB32);
|
size_t const src_skip = source.pitch() / sizeof(ARGB32);
|
||||||
for (int row = first_row; row <= last_row; ++row) {
|
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;
|
dst += dst_skip;
|
||||||
src += src_skip;
|
src += src_skip;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue