Blame SOURCES/0011-xwayland-shm-don-t-create-alpha-buffers-if-the-windo.patch
|
|
d64d53 |
From 341f2f5de09e59c3498d5f4e626b8fd86f4a0dcd Mon Sep 17 00:00:00 2001
|
|
|
70130e |
From: Giovanni Campagna <gcampagn@redhat.com>
|
|
|
70130e |
Date: Wed, 21 Aug 2013 09:53:25 +0200
|
|
|
d64d53 |
Subject: [PATCH 11/38] xwayland-shm: don't create alpha buffers if the window
|
|
|
70130e |
doesn't have alpha
|
|
|
70130e |
|
|
|
70130e |
If the window is using a 24 bit visual, we must request a buffer
|
|
|
70130e |
format without alpha, or garbage is rendered.
|
|
|
70130e |
---
|
|
|
70130e |
hw/xfree86/xwayland/xwayland.c | 5 ++++-
|
|
|
70130e |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
70130e |
|
|
|
70130e |
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
|
|
|
70130e |
index f59bfe4..880b7ec 100644
|
|
|
70130e |
--- a/hw/xfree86/xwayland/xwayland.c
|
|
|
70130e |
+++ b/hw/xfree86/xwayland/xwayland.c
|
|
|
70130e |
@@ -278,7 +278,10 @@ xwl_create_window_buffer_shm(struct xwl_window *xwl_window,
|
|
|
70130e |
xwl_window->buffer = wl_shm_pool_create_buffer(pool, 0,
|
|
|
70130e |
pixmap->drawable.width,
|
|
|
70130e |
pixmap->drawable.height,
|
|
|
70130e |
- stride, WL_SHM_FORMAT_ARGB8888);
|
|
|
70130e |
+ stride,
|
|
|
70130e |
+ pixmap->drawable.depth == 32 ?
|
|
|
70130e |
+ WL_SHM_FORMAT_ARGB8888 :
|
|
|
70130e |
+ WL_SHM_FORMAT_XRGB8888);
|
|
|
70130e |
wl_shm_pool_destroy(pool);
|
|
|
70130e |
|
|
|
70130e |
return xwl_window->buffer ? Success : BadDrawable;
|
|
|
70130e |
--
|
|
|
d64d53 |
1.8.4.2
|
|
|
70130e |
|