summaryrefslogtreecommitdiff
path: root/hw/kdrive
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2022-02-08 18:02:40 -0500
committerAdam Jackson <ajax@redhat.com>2022-06-27 16:39:49 -0400
commit7f8848996377bc7883ad108fa55958656330cdc1 (patch)
tree4e513d3058caf33e63ae2fe3e0a84b1b7bcbd793 /hw/kdrive
parent92a00f52217b71107dcdc39cfaf56f77a41b42b1 (diff)
downloadxserver-7f8848996377bc7883ad108fa55958656330cdc1.tar.gz
ephyr: Sync less in hostx_paint_rect
Move the xcb_aux_sync into the shm path, where we do still need it to synchronize access with the host. In the non-shm path the image is copied to the host anyway so the sync just adds latency and keeps you from using all your network bandwidth. Only the non-shm-putimage path benefits from this, but the benefit is significant even on the local machine (here a 3.2GHz Core i7-8700, using XEPHYR_NO_SHM=1): before after Operation ------------ -------------------- ------------------------- 228000000.0 225000000.0 (0.987) Dot 40900000.0 41600000.0 (1.017) 1x1 rectangle 10400000.0 10700000.0 (1.029) 10x10 rectangle 477000.0 471000.0 (0.987) 100x100 rectangle 30900.0 31800.0 (1.029) 500x500 rectangle 760000.0 981000.0 (1.291) PutImage 10x10 square 14700.0 19200.0 (1.306) PutImage 100x100 square 320.0 382.0 (1.194) PutImage 500x500 square 749000.0 984000.0 (1.314) ShmPutImage 10x10 square 268000.0 304000.0 (1.134) ShmPutImage 100x100 square 16600.0 18500.0 (1.114) ShmPutImage 500x500 square Reviewed-by: Emma Anholt <emma@anholt.net>
Diffstat (limited to 'hw/kdrive')
-rw-r--r--hw/kdrive/ephyr/hostx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index f9cb6980f..d8ed68bfd 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -1100,6 +1100,7 @@ hostx_paint_rect(KdScreenInfo *screen,
HostX.gc, scrpriv->ximg,
scrpriv->shminfo,
sx, sy, dx, dy, width, height, FALSE);
+ xcb_aux_sync(HostX.conn);
}
else {
xcb_image_t *subimg = xcb_image_subimage(scrpriv->ximg, sx, sy,
@@ -1110,8 +1111,6 @@ hostx_paint_rect(KdScreenInfo *screen,
xcb_image_destroy(img);
xcb_image_destroy(subimg);
}
-
- xcb_aux_sync(HostX.conn);
}
static void