[codec,color] expose freerdp_image_copy (no)overlap

expose functions for overlapping and non overlapping images to use
directly
This commit is contained in:
akallabeth
2024-05-23 10:07:14 +02:00
parent 1a58e74c17
commit 1b3f3a0408
15 changed files with 114 additions and 77 deletions

View File

@@ -405,9 +405,9 @@ static void (^mac_capture_stream_handler)(
}
else
{
freerdp_image_copy(surface->data, surface->format, surface->scanline, x, y, width, height,
pSrcData, PIXEL_FORMAT_BGRX32, nSrcStep, x, y, NULL,
FREERDP_FLIP_NONE);
freerdp_image_copy_no_overlap(surface->data, surface->format, surface->scanline, x, y,
width, height, pSrcData, PIXEL_FORMAT_BGRX32, nSrcStep, x,
y, NULL, FREERDP_FLIP_NONE);
}
LeaveCriticalSection(&(surface->lock));

View File

@@ -314,8 +314,9 @@ static int win_shadow_surface_copy(winShadowSubsystem* subsystem)
if (status <= 0)
return status;
if (!freerdp_image_copy(surface->data, surface->format, surface->scanline, x, y, width, height,
pDstData, DstFormat, nDstStep, x, y, NULL, FREERDP_FLIP_NONE))
if (!freerdp_image_copy_no_overlap(surface->data, surface->format, surface->scanline, x, y,
width, height, pDstData, DstFormat, nDstStep, x, y, NULL,
FREERDP_FLIP_NONE))
return ERROR_INTERNAL_ERROR;
ArrayList_Lock(server->clients);

View File

@@ -853,10 +853,10 @@ static int x11_shadow_screen_grab(x11ShadowSubsystem* subsystem)
WINPR_ASSERT(image->bytes_per_line >= 0);
WINPR_ASSERT(width >= 0);
WINPR_ASSERT(height >= 0);
success = freerdp_image_copy(surface->data, surface->format, surface->scanline, x, y,
(UINT32)width, (UINT32)height, (BYTE*)image->data,
subsystem->format, (UINT32)image->bytes_per_line, x, y,
NULL, FREERDP_FLIP_NONE);
success = freerdp_image_copy_no_overlap(
surface->data, surface->format, surface->scanline, x, y, (UINT32)width,
(UINT32)height, (BYTE*)image->data, subsystem->format,
(UINT32)image->bytes_per_line, x, y, NULL, FREERDP_FLIP_NONE);
LeaveCriticalSection(&surface->lock);
if (!success)
goto fail_capture;

View File

@@ -1335,8 +1335,8 @@ static BOOL shadow_client_send_surface_gfx(rdpShadowClient* client, const BYTE*
WINPR_ASSERT(data);
rc = freerdp_image_copy(data, PIXEL_FORMAT_BGRA32, 0, 0, 0, w, h, pSrcData, SrcFormat,
nSrcStep, cmd.left, cmd.top, NULL, 0);
rc = freerdp_image_copy_no_overlap(data, PIXEL_FORMAT_BGRA32, 0, 0, 0, w, h, pSrcData,
SrcFormat, nSrcStep, cmd.left, cmd.top, NULL, 0);
WINPR_ASSERT(rc);
cmd.data = data;