mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 13:38:45 +02:00
Add an optimization for full width fills on some hardware
If we know the rowstride is the same width as the frame buffer then we can memcpy multiple rows at one time.
This commit is contained in:
parent
697dc98ebb
commit
3493c2919f
1 changed files with 6 additions and 0 deletions
|
|
@ -188,6 +188,12 @@ flush_xrgb32 (ply_frame_buffer_t *buffer)
|
|||
dst = &buffer->map_address[(y1 * buffer->row_stride + x1) * 4];
|
||||
src = (char *) &buffer->shadow_buffer[y1 * buffer->row_stride + x1];
|
||||
|
||||
if (buffer->area_to_flush.width == buffer->row_stride)
|
||||
{
|
||||
memcpy (dst, src, buffer->area_to_flush.width * buffer->area_to_flush.height * 4);
|
||||
return;
|
||||
}
|
||||
|
||||
for (y = y1; y < y2; y++)
|
||||
{
|
||||
memcpy (dst, src, buffer->area_to_flush.width * 4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue