diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2021-04-24 17:47:57 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2021-04-25 14:59:32 +0200 |
commit | 6dea4493432086e510b044d3dda3451ee045e3dd (patch) | |
tree | 11556e792b8776ea5a96f0efe0267b09d0d83d6b /net-misc/gnome-remote-desktop | |
parent | net-ftp/atftp: remove unused patches (diff) | |
download | gentoo-6dea4493432086e510b044d3dda3451ee045e3dd.tar.gz gentoo-6dea4493432086e510b044d3dda3451ee045e3dd.tar.bz2 gentoo-6dea4493432086e510b044d3dda3451ee045e3dd.zip |
net-misc/gnome-remote-desktop: remove unused patch(es)
Closes: https://github.com/gentoo/gentoo/pull/20526
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-misc/gnome-remote-desktop')
-rw-r--r-- | net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-copy-pixels.patch | 71 | ||||
-rw-r--r-- | net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-drop-vnc-frames.patch | 80 |
2 files changed, 0 insertions, 151 deletions
diff --git a/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-copy-pixels.patch b/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-copy-pixels.patch deleted file mode 100644 index 44cecbf6ad60..000000000000 --- a/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-copy-pixels.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4d358762948dccdcac6d01f4dd7b8635e53de979 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 a06d34d..ba3e5ce 100644 ---- a/src/grd-session-vnc.c -+++ b/src/grd-session-vnc.c -@@ -519,9 +519,10 @@ check_rfb_password (rfbClientPtr rfb_client, - } - - 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; - } - - static void -diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index 07678c8..ee1f986 100644 ---- a/src/grd-session-vnc.h -+++ b/src/grd-session-vnc.h -@@ -55,7 +55,8 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc, - int x, - int y); - --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++) --- -GitLab - diff --git a/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-drop-vnc-frames.patch b/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-drop-vnc-frames.patch deleted file mode 100644 index 56ea75ff466d..000000000000 --- a/net-misc/gnome-remote-desktop/files/gnome-remote-desktop-0.1.9-drop-vnc-frames.patch +++ /dev/null @@ -1,80 +0,0 @@ -From ab97841629f5f3f4fab9993b6255b6ae04828b9c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com> -Date: Wed, 9 Sep 2020 10:14:20 +0200 -Subject: [PATCH] vnc: Drop frames if client is gone - -Frames from PipeWire are posted asynchronously from a I/O thread to the -main thread where they are turned into VNC frame updates and cursor -movements. On the other hand, sessions are closed asynchronously when -the VNC client disappears. If a frame ended up on the main thread after -a client disappeared but before the session and stream was closed, we'd -try to turn the new frames into VNC updates without a client being -available, causing use after free. - -Fix this by dropping frames that happens during this time frame. - -Closes: https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/43 ---- - src/grd-session-vnc.c | 7 +++++++ - src/grd-session-vnc.h | 2 ++ - src/grd-vnc-pipewire-stream.c | 8 ++++++++ - 3 files changed, 17 insertions(+) - -diff --git a/src/grd-session-vnc.c b/src/grd-session-vnc.c -index 813838a..a06d34d 100644 ---- a/src/grd-session-vnc.c -+++ b/src/grd-session-vnc.c -@@ -209,6 +209,12 @@ maybe_queue_close_session_idle (GrdSessionVnc *session_vnc) - g_idle_add (close_session_idle, session_vnc); - } - -+gboolean -+grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc) -+{ -+ return !session_vnc->rfb_client; -+} -+ - static void - handle_client_gone (rfbClientPtr rfb_client) - { -@@ -218,6 +224,7 @@ handle_client_gone (rfbClientPtr rfb_client) - - grd_session_vnc_detach_source (session_vnc); - maybe_queue_close_session_idle (session_vnc); -+ session_vnc->rfb_client = NULL; - } - - static void -diff --git a/src/grd-session-vnc.h b/src/grd-session-vnc.h -index 579a12a..07678c8 100644 ---- a/src/grd-session-vnc.h -+++ b/src/grd-session-vnc.h -@@ -57,4 +57,6 @@ void grd_session_vnc_move_cursor (GrdSessionVnc *session_vnc, - - int grd_session_vnc_get_framebuffer_stride (GrdSessionVnc *session_vnc); - -+gboolean grd_session_vnc_is_client_gone (GrdSessionVnc *session_vnc); -+ - #endif /* GRD_SESSION_VNC_H */ -diff --git a/src/grd-vnc-pipewire-stream.c b/src/grd-vnc-pipewire-stream.c -index 78793c4..96dd7c9 100644 ---- a/src/grd-vnc-pipewire-stream.c -+++ b/src/grd-vnc-pipewire-stream.c -@@ -234,6 +234,14 @@ do_render (struct spa_loop *loop, - if (!frame) - return 0; - -+ if (grd_session_vnc_is_client_gone (stream->session)) -+ { -+ g_free (frame->data); -+ g_clear_pointer (&frame->rfb_cursor, rfbFreeCursor); -+ g_free (frame); -+ return 0; -+ } -+ - if (frame->rfb_cursor) - grd_session_vnc_set_cursor (stream->session, frame->rfb_cursor); - --- -GitLab - |