diff options
author | CoprDistGit <infra@openeuler.org> | 2023-09-06 11:41:41 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-09-06 11:41:41 +0000 |
commit | 331c53f7f4cdd62df081f8979fc3cfc2052a6e7a (patch) | |
tree | dae65f5cd9b9aa6f15dad05e07aed07928813389 /0001-vnc-Copy-pixels-using-the-right-destination-stride.patch | |
parent | 2db48c7c4bcd0ad22c831c307dd4fce52a3140ec (diff) |
automatic import of gnome-remote-desktopopeneuler20.03
Diffstat (limited to '0001-vnc-Copy-pixels-using-the-right-destination-stride.patch')
-rw-r--r-- | 0001-vnc-Copy-pixels-using-the-right-destination-stride.patch | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch b/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch deleted file mode 100644 index fc5c830..0000000 --- a/0001-vnc-Copy-pixels-using-the-right-destination-stride.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 81172effba7c70d3b2932c67be79a2924eae9d73 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com> -Date: Mon, 12 Oct 2020 17:34:30 +0200 -Subject: [PATCH] vnc: Copy pixels using the right destination stride - -We're copying the pixels in a separate thread managed by PipeWire, and -in this thread, accessing the VNC framebuffer dimension and stride is -racy. Instead of fetching the dimension directly, pass the expected -width and get the stride it will eventually have. - -Already before this patch, when the copied pixel end up on the main -thread and the dimension still doesn't match up, the frame will be -dropped. ---- - src/grd-session-vnc.c | 5 +++-- - src/grd-session-vnc.h | 3 ++- - src/grd-vnc-pipewire-stream.c | 5 +++-- - 3 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 69fb33d..f4835aa 100644 ---- a/src/grd-session-vnc.c -+++ b/src/grd-session-vnc.c -@@ -535,9 +535,10 @@ grd_session_vnc_get_fd (GrdSessionVnc *session_vnc) - } - - int --grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc) -+grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, -+ int width) - { -- return session_vnc->rfb_screen->paddedWidthInBytes; -+ return width * BGRX_BYTES_PER_PIXEL; - } - - rfbClientPtr -diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index 0d01ad3..ccd046c 100644 ---- a/src/grd-session-vnc.h -+++ b/src/grd-session-vnc.h -@@ -60,7 +60,8 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc, - - int grd_session_vnc_get_fd (GrdSessionVnc *session_vnc); - --int grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc); -+int grd_session_vnc_get_stride_for_width (GrdSessionVnc *session_vnc, -+ int width); - - gboolean grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc); - -diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c -index 96dd7c9..82ceb9b 100644 ---- a/src/grd-vnc-pipewire-stream.c -+++ b/src/grd-vnc-pipewire-stream.c -@@ -326,10 +326,11 @@ process_buffer (GrdVncPipeWireStream *stream, - int height; - int y; - -- src_stride = buffer->datas[0].chunk->stride; -- dst_stride = grd_session_vnc_get_framebuffer_stride (stream->session); - height = stream->spa_format.size.height; - width = stream->spa_format.size.width; -+ src_stride = buffer->datas[0].chunk->stride; -+ dst_stride = grd_session_vnc_get_stride_for_width (stream->session, -+ width); - - frame->data = g_malloc (height * dst_stride); - for (y = 0; y < height; y++) --- -2.28.0 - |