mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03: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
Notes:
sideshowbarker
2024-07-17 07:10:27 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/bfb4e08612 Pull-request: https://github.com/SerenityOS/serenity/pull/15238 Reviewed-by: https://github.com/Quaker762 ✅
@ -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 New Issue
Block a user