[packages/weston] - added freerdp2 patch (update for 20180809 snapshot); release 2

qboosh qboosh at pld-linux.org
Thu Oct 11 21:21:38 CEST 2018


commit d130821fdcb5571e4c4a782e8535206d0cc0415d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Oct 11 21:25:07 2018 +0200

    - added freerdp2 patch (update for 20180809 snapshot); release 2

 weston-freerdp2.patch | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
 weston.spec           |  10 +++--
 2 files changed, 123 insertions(+), 4 deletions(-)
---
diff --git a/weston.spec b/weston.spec
index 09ce66d..4afb4f7 100644
--- a/weston.spec
+++ b/weston.spec
@@ -16,12 +16,13 @@ Summary:	Weston - Wayland demos
 Summary(pl.UTF-8):	Weston - programy demonstracyjne dla protokołu Wayland
 Name:		weston
 Version:	5.0.0
-Release:	1
+Release:	2
 License:	MIT
 Group:		Applications
 #Source0Download: https://wayland.freedesktop.org/releases.html
 Source0:	https://wayland.freedesktop.org/releases/%{name}-%{version}.tar.xz
 # Source0-md5:	752a04ce3c65af4884cfac4e57231bdb
+Patch0:		%{name}-freerdp2.patch
 URL:		https://wayland.freedesktop.org/
 BuildRequires:	Mesa-libEGL-devel >= 7.10
 # GLESv2
@@ -32,8 +33,8 @@ BuildRequires:	cairo-devel >= 1.10.0
 BuildRequires:	colord-devel >= 0.1.27
 BuildRequires:	dbus-devel >= 1.6
 BuildRequires:	doxygen
-# or freerdp >= 1.1.0
-%{?with_rdp:BuildRequires:	freerdp2-devel >= 2.0.0}
+# or freerdp >= 1.1.0 (without freerdp2 patch)
+%{?with_rdp:BuildRequires:	freerdp2-devel >= 2.0.0-0.20180809.1}
 BuildRequires:	lcms2-devel >= 2
 BuildRequires:	libdrm-devel >= 2.4.68
 BuildRequires:	libinput-devel >= 0.8.0
@@ -180,7 +181,7 @@ Summary:	RDP compositor plugin for Weston
 Summary(pl.UTF-8):	Wtyczka składająca RDP dla Westona
 Group:		Libraries
 Requires:	%{name} = %{version}-%{release}
-Requires:	freerdp2 >= 2.0.0
+Requires:	freerdp2 >= 2.0.0-0.20180809.1
 
 %description compositor-rdp
 RDP compositor plugin for Weston.
@@ -190,6 +191,7 @@ Wtyczka składająca RDP dla Westona.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/weston-freerdp2.patch b/weston-freerdp2.patch
new file mode 100644
index 0000000..7fc2e77
--- /dev/null
+++ b/weston-freerdp2.patch
@@ -0,0 +1,117 @@
+--- weston-5.0.0/libweston/compositor-rdp.c.orig	2018-08-24 20:04:16.000000000 +0200
++++ weston-5.0.0/libweston/compositor-rdp.c	2018-10-11 21:16:08.197352052 +0200
+@@ -86,6 +86,7 @@
+ #include <freerdp/listener.h>
+ #include <freerdp/update.h>
+ #include <freerdp/input.h>
++#include <freerdp/cache/cache.h>
+ #include <freerdp/codec/color.h>
+ #include <freerdp/codec/rfx.h>
+ #include <freerdp/codec/nsc.h>
+@@ -198,8 +199,10 @@
+ 	uint32_t *ptr;
+ 	RFX_RECT *rfxRect;
+ 	rdpUpdate *update = peer->update;
+-	SURFACE_BITS_COMMAND *cmd = &update->surface_bits_command;
++	SURFACE_BITS_COMMAND *cmd = calloc(1, sizeof(SURFACE_BITS_COMMAND));
+ 	RdpPeerContext *context = (RdpPeerContext *)peer->context;
++	if (!cmd)
++		return;
+ 
+ 	Stream_Clear(context->encode_stream);
+ 	Stream_SetPosition(context->encode_stream, 0);
+@@ -209,8 +212,6 @@
+ 
+ #ifdef HAVE_SKIP_COMPRESSION
+ 	cmd->skipCompression = TRUE;
+-#else
+-	memset(cmd, 0, sizeof(*cmd));
+ #endif
+ 	cmd->destLeft = damage->extents.x1;
+ 	cmd->destTop = damage->extents.y1;
+@@ -246,6 +247,8 @@
+ 	SURFACE_BITMAP_DATA(cmd) = Stream_Buffer(context->encode_stream);
+ 
+ 	update->SurfaceBits(update->context, cmd);
++
++	free(cmd);
+ }
+ 
+ 
+@@ -255,8 +258,10 @@
+ 	int width, height;
+ 	uint32_t *ptr;
+ 	rdpUpdate *update = peer->update;
+-	SURFACE_BITS_COMMAND *cmd = &update->surface_bits_command;
++	SURFACE_BITS_COMMAND *cmd = calloc(1, sizeof(SURFACE_BITS_COMMAND));
+ 	RdpPeerContext *context = (RdpPeerContext *)peer->context;
++	if (!cmd)
++		return;
+ 
+ 	Stream_Clear(context->encode_stream);
+ 	Stream_SetPosition(context->encode_stream, 0);
+@@ -266,8 +271,6 @@
+ 
+ #ifdef HAVE_SKIP_COMPRESSION
+ 	cmd->skipCompression = TRUE;
+-#else
+-	memset(cmd, 0, sizeof(*cmd));
+ #endif
+ 
+ 	cmd->destLeft = damage->extents.x1;
+@@ -290,6 +293,8 @@
+ 	SURFACE_BITMAP_DATA(cmd) = Stream_Buffer(context->encode_stream);
+ 
+ 	update->SurfaceBits(update->context, cmd);
++
++	free(cmd);
+ }
+ 
+ static void
+@@ -310,15 +315,19 @@
+ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_peer *peer)
+ {
+ 	rdpUpdate *update = peer->update;
+-	SURFACE_BITS_COMMAND *cmd = &update->surface_bits_command;
+-	SURFACE_FRAME_MARKER *marker = &update->surface_frame_marker;
++	SURFACE_BITS_COMMAND *cmd = calloc(1, sizeof(SURFACE_BITS_COMMAND));
++	if (!cmd)
++		return;
++	SURFACE_FRAME_MARKER *marker = calloc(1, sizeof(SURFACE_FRAME_MARKER));
++	if (!marker)
++		goto fail2;
+ 	pixman_box32_t *rect, subrect;
+ 	int nrects, i;
+ 	int heightIncrement, remainingHeight, top;
+ 
+ 	rect = pixman_region32_rectangles(region, &nrects);
+ 	if (!nrects)
+-		return;
++		goto fail;
+ 
+ 	marker->frameId++;
+ 	marker->frameAction = SURFACECMD_FRAMEACTION_BEGIN;
+@@ -362,6 +371,10 @@
+ 
+ 	marker->frameAction = SURFACECMD_FRAMEACTION_END;
+ 	update->SurfaceFrameMarker(peer->context, marker);
++fail:
++	free(marker);
++fail2:
++	free(cmd);
+ }
+ 
+ static void
+@@ -1055,9 +1068,10 @@
+ 	peersItem->flags |= RDP_PEER_ACTIVATED;
+ 
+ 	/* disable pointer on the client side */
++	POINTER_SYSTEM_UPDATE pointer_system;
++	pointer_system.type = SYSPTR_NULL;
+ 	pointer = client->update->pointer;
+-	pointer->pointer_system.type = SYSPTR_NULL;
+-	pointer->PointerSystem(client->context, &pointer->pointer_system);
++	pointer->PointerSystem(client->context, &pointer_system);
+ 
+ 	/* sends a full refresh */
+ 	box.x1 = 0;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/weston.git/commitdiff/d130821fdcb5571e4c4a782e8535206d0cc0415d



More information about the pld-cvs-commit mailing list