From d191d06820b94027561f0f73a3d89330e2e32c5e Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 31 Jul 2024 15:09:48 +0200 Subject: [PATCH] (!1654) Xnest: use xcb_put_image() for PutImage requests Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/GCOps.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 47c5f9010..c981b1305 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -30,6 +30,7 @@ is" without express or implied warranty. #include "servermd.h" #include "Xnest.h" +#include "xnest-xcb.h" #include "Display.h" #include "Screen.h" @@ -81,19 +82,19 @@ void xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { - XImage *ximage; - - ximage = XCreateImage(xnestDisplay, xnestDefaultVisual(pDrawable->pScreen), - depth, format, leftPad, (char *) pImage, - w, h, BitmapPad(xnestDisplay), - (format == ZPixmap) ? - PixmapBytePad(w, depth) : BitmapBytePad(w + leftPad)); - - if (ximage) { - XPutImage(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), - ximage, 0, 0, x, y, w, h); - XFree(ximage); - } + xcb_put_image(xnestUpstreamInfo.conn, + format, + xnestDrawable(pDrawable), + xnest_upstream_gc(pGC), + w, + h, + x, + y, + leftPad, + depth, + (format == XCB_IMAGE_FORMAT_Z_PIXMAP ? PixmapBytePad(w, depth) + : BitmapBytePad(w + leftPad)) * h, + (uint8_t*)pImage); } static int