Commit b65ae442 authored by Luca Weiss's avatar Luca Weiss Committed by Oliver Smith

main/weston: add patch for compilation with freerdp 2.0.0-rc2 (#1480)

parent 95ba4c51
From 8fad15621a4cc5858edd240987a8b3a3b90895a3 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Thu, 10 May 2018 18:36:41 +0200
Subject: [PATCH] Fix compositor-rdp compilation with freerdp 2.0.0-rc2
See https://github.com/FreeRDP/FreeRDP/commit/1f7d33a2f22a372c124ce985a394619e186e06b9
---
libweston/compositor-rdp.c | 50 +++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
index 091472b0..79b7f68d 100644
--- a/libweston/compositor-rdp.c
+++ b/libweston/compositor-rdp.c
@@ -185,10 +185,10 @@ rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
cmd->destTop = damage->extents.y1;
cmd->destRight = damage->extents.x2;
cmd->destBottom = damage->extents.y2;
- cmd->bpp = 32;
- cmd->codecID = peer->settings->RemoteFxCodecId;
- cmd->width = width;
- cmd->height = height;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = peer->settings->RemoteFxCodecId;
+ cmd->bmp.width = width;
+ cmd->bmp.height = height;
ptr = pixman_image_get_data(image) + damage->extents.x1 +
damage->extents.y1 * (pixman_image_get_stride(image) / sizeof(uint32_t));
@@ -211,8 +211,8 @@ rdp_peer_refresh_rfx(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
pixman_image_get_stride(image)
);
- cmd->bitmapDataLength = Stream_GetPosition(context->encode_stream);
- cmd->bitmapData = Stream_Buffer(context->encode_stream);
+ cmd->bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
+ cmd->bmp.bitmapData = Stream_Buffer(context->encode_stream);
update->SurfaceBits(update->context, cmd);
}
@@ -242,19 +242,19 @@ rdp_peer_refresh_nsc(pixman_region32_t *damage, pixman_image_t *image, freerdp_p
cmd->destTop = damage->extents.y1;
cmd->destRight = damage->extents.x2;
cmd->destBottom = damage->extents.y2;
- cmd->bpp = 32;
- cmd->codecID = peer->settings->NSCodecId;
- cmd->width = width;
- cmd->height = height;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = peer->settings->NSCodecId;
+ cmd->bmp.width = width;
+ cmd->bmp.height = height;
ptr = pixman_image_get_data(image) + damage->extents.x1 +
damage->extents.y1 * (pixman_image_get_stride(image) / sizeof(uint32_t));
nsc_compose_message(context->nsc_context, context->encode_stream, (BYTE *)ptr,
- cmd->width, cmd->height,
+ cmd->bmp.width, cmd->bmp.height,
pixman_image_get_stride(image));
- cmd->bitmapDataLength = Stream_GetPosition(context->encode_stream);
- cmd->bitmapData = Stream_Buffer(context->encode_stream);
+ cmd->bmp.bitmapDataLength = Stream_GetPosition(context->encode_stream);
+ cmd->bmp.bitmapData = Stream_Buffer(context->encode_stream);
update->SurfaceBits(update->context, cmd);
}
@@ -291,16 +291,16 @@ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_p
update->SurfaceFrameMarker(peer->context, marker);
memset(cmd, 0, sizeof(*cmd));
- cmd->bpp = 32;
- cmd->codecID = 0;
+ cmd->bmp.bpp = 32;
+ cmd->bmp.codecID = 0;
for (i = 0; i < nrects; i++, rect++) {
/*weston_log("rect(%d,%d, %d,%d)\n", rect->x1, rect->y1, rect->x2, rect->y2);*/
cmd->destLeft = rect->x1;
cmd->destRight = rect->x2;
- cmd->width = rect->x2 - rect->x1;
+ cmd->bmp.width = rect->x2 - rect->x1;
- heightIncrement = peer->settings->MultifragMaxRequestSize / (16 + cmd->width * 4);
+ heightIncrement = peer->settings->MultifragMaxRequestSize / (16 + cmd->bmp.width * 4);
remainingHeight = rect->y2 - rect->y1;
top = rect->y1;
@@ -308,21 +308,21 @@ rdp_peer_refresh_raw(pixman_region32_t *region, pixman_image_t *image, freerdp_p
subrect.x2 = rect->x2;
while (remainingHeight) {
- cmd->height = (remainingHeight > heightIncrement) ? heightIncrement : remainingHeight;
+ cmd->bmp.height = (remainingHeight > heightIncrement) ? heightIncrement : remainingHeight;
cmd->destTop = top;
- cmd->destBottom = top + cmd->height;
- cmd->bitmapDataLength = cmd->width * cmd->height * 4;
- cmd->bitmapData = (BYTE *)realloc(cmd->bitmapData, cmd->bitmapDataLength);
+ cmd->destBottom = top + cmd->bmp.height;
+ cmd->bmp.bitmapDataLength = cmd->bmp.width * cmd->bmp.height * 4;
+ cmd->bmp.bitmapData = (BYTE *)realloc(cmd->bmp.bitmapData, cmd->bmp.bitmapDataLength);
subrect.y1 = top;
- subrect.y2 = top + cmd->height;
- pixman_image_flipped_subrect(&subrect, image, cmd->bitmapData);
+ subrect.y2 = top + cmd->bmp.height;
+ pixman_image_flipped_subrect(&subrect, image, cmd->bmp.bitmapData);
/*weston_log("* sending (%d,%d, %d,%d)\n", subrect.x1, subrect.y1, subrect.x2, subrect.y2); */
update->SurfaceBits(peer->context, cmd);
- remainingHeight -= cmd->height;
- top += cmd->height;
+ remainingHeight -= cmd->bmp.height;
+ top += cmd->bmp.height;
}
}
--
2.17.0
......@@ -3,7 +3,7 @@
pkgname=weston
pkgver=9999
_pkgver=3.0.0
pkgrel=13
pkgrel=14
_libname=lib$pkgname
_libdir=$_libname-${_pkgver%%.*}
pkgdesc="The reference Wayland server"
......@@ -13,12 +13,12 @@ license="MIT"
depends=""
makedepends="wayland-protocols libxkbcommon-dev xkeyboard-config
libinput-dev libunwind-dev mtdev-dev libxcursor-dev glu-dev
pango-dev colord-dev libwebp-dev libva-dev dbus-dev
linux-pam-dev wayland-libs-egl wayland-dev"
pango-dev colord-dev freerdp-dev libwebp-dev libva-dev dbus-dev
linux-pam-dev wayland-dev"
_cms="cms-colord cms-static"
_shell="shell-desktop shell-fullscreen shell-ivi"
_client="info terminal wcap-decode"
_backend="backend-drm backend-fbdev backend-headless backend-x11 backend-wayland"
_backend="backend-drm backend-fbdev backend-headless backend-rdp backend-x11 backend-wayland"
options="!check suid"
for _sub in $_cms $_shell $_client $_backend; do
......@@ -36,6 +36,7 @@ source="
0004-musl-weston-launcher.patch
0005-timespec.patch
0006-compositor-fbdev-fix-start-up-assertion.patch
0007-Fix-compositor-rdp-compilation-with-freerdp-2.0.0-rc.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
......@@ -49,6 +50,7 @@ build() {
--mandir=/usr/share/man \
--localstatedir=/var \
--libexecdir=/usr/lib/$pkgname \
--enable-rdp-compositor \
--enable-screen-sharing \
--enable-vaapi-recorder \
--enable-clients \
......@@ -138,4 +140,5 @@ fa1099258aaef38f228de2e9ca3e2ae5e9e21ed10891f8686f5abd16d7f6bc6c57e43e0bfc3175ed
b5eb741ea8b6fcbd9de95e773fe0bf4ae6588ef57564f97a65aefc6c7ec29f1a01de9764a25672fd7c76c8ff514b497743cbaf279818123041c161c7a1e62bb6 0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch
856a28a324cb9adf94b92bf5489ff43827d57e6acee0c7e0e558018357166b782126e086a4308c3e3499d068fa07f02862cc20cdfbc9a3d6af30ec823eb1b78f 0004-musl-weston-launcher.patch
3e596af4bf0a6b06a5d28376043db111fe1c161ead04501fa6d2c667b5a21889cca3354d1bdc4ac794841bef68ed5e1a7a84e44e7d510e947e3673195706caed 0005-timespec.patch
5d356bc8534c5486b0c5daf727fb8d2cd8409f7f964e3f391c225a2b21b9f293e36d10344f55f0e6566bfbde415c990a72d57fe5db6081acd3c788106cda319f 0006-compositor-fbdev-fix-start-up-assertion.patch"
5d356bc8534c5486b0c5daf727fb8d2cd8409f7f964e3f391c225a2b21b9f293e36d10344f55f0e6566bfbde415c990a72d57fe5db6081acd3c788106cda319f 0006-compositor-fbdev-fix-start-up-assertion.patch
fb1f97058723bca27fc80b41e97d6f30987ab5fa2861d07bc41df4755fe431e0900fb82fbd92fd235db30cbca7869b624ffb95a07c0dfe752379a3ff8690c4ef 0007-Fix-compositor-rdp-compilation-with-freerdp-2.0.0-rc.patch"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment