xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 23 13:37:12 UTC 2019
hw/xwayland/xwayland-cursor.c | 3 ++-
hw/xwayland/xwayland-glamor-gbm.c | 6 +++---
hw/xwayland/xwayland-shm.c | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 0f19381f4906e3100cd43544f1cad82d2a933c63
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Tue Jul 9 11:08:27 2019 +0200
xwayland: Don't create wl_buffer backing pixmap
In non-rootless mode, not all pixmaps need a wl_buffer backing.
Suggested-by: Twaik Yont (@twaik) in #834
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>
diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index 66720bcc0..ec0029438 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -66,7 +66,8 @@ xwl_realize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor)
PixmapPtr pixmap;
pixmap = xwl_shm_create_pixmap(screen, cursor->bits->width,
- cursor->bits->height, 32, 0);
+ cursor->bits->height, 32,
+ CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, pixmap);
return TRUE;
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index e2a240c23..354695060 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -212,9 +212,9 @@ xwl_glamor_gbm_create_pixmap(ScreenPtr screen,
PixmapPtr pixmap = NULL;
if (width > 0 && height > 0 && depth >= 15 &&
- (hint == 0 ||
- hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
- hint == CREATE_PIXMAP_USAGE_SHARED)) {
+ (hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
+ hint == CREATE_PIXMAP_USAGE_SHARED ||
+ (xwl_screen->rootless && hint == 0))) {
uint32_t format = gbm_format_for_depth(depth);
#ifdef GBM_BO_WITH_MODIFIERS
diff --git a/hw/xwayland/xwayland-shm.c b/hw/xwayland/xwayland-shm.c
index 29732eaca..d1127efc0 100644
--- a/hw/xwayland/xwayland-shm.c
+++ b/hw/xwayland/xwayland-shm.c
@@ -202,6 +202,7 @@ xwl_shm_create_pixmap(ScreenPtr screen,
int fd;
if (hint == CREATE_PIXMAP_USAGE_GLYPH_PICTURE ||
+ (!xwl_screen->rootless && hint != CREATE_PIXMAP_USAGE_BACKING_PIXMAP) ||
(width == 0 && height == 0) || depth < 15)
return fbCreatePixmap(screen, width, height, depth, hint);
More information about the xorg-commit
mailing list