Accepting request 508713 from home:vliaskovitis:branches:GNOME:Factory

Support RGB16_565 format for 16-bit depth sessions (FATE#323412, bgo#781704, bsc#1024748)

OBS-URL: https://build.opensuse.org/request/show/508713
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=243
This commit is contained in:
Dominique Leuenberger 2017-07-13 07:08:52 +00:00 committed by Git OBS Bridge
parent 823dd98e70
commit d8492b64a2
3 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,66 @@
From ac29ffebc3cbc4aa33e2f4685039496d2cff6170 Mon Sep 17 00:00:00 2001
From: Vasilis Liaskovitis <vliaskovitis@suse.com>
Date: Thu, 6 Jul 2017 10:26:57 +0200
Subject: [PATCH] iconcache: Support RGB16_565 format for 16-bit color depth
sessions
Add an RGB16_565 XRenderPictformat. Otherwise, 16-bit depth sessions
terminate in standard_pict_format_for_depth().
https://bugzilla.gnome.org/show_bug.cgi?id=781704
---
src/x11/iconcache.c | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/src/x11/iconcache.c b/src/x11/iconcache.c
index 508dd82b1..f77783a05 100644
--- a/src/x11/iconcache.c
+++ b/src/x11/iconcache.c
@@ -304,10 +304,43 @@ standard_pict_format_for_depth (int depth)
}
}
+static XRenderPictFormat RGB16_565_Format =
+/* PictRGB16_565 */
+{
+ {
+ 0, /* id */
+ PictTypeDirect, /* type */
+ 16, /* depth */
+ { /* direct */
+ 11, /* direct.red */
+ 0x1f, /* direct.redMask */
+ 5, /* direct.green */
+ 0x3f, /* direct.greenMask */
+ 0, /* direct.blue */
+ 0x1f, /* direct.blueMask */
+ 0, /* direct.alpha */
+ 0x00, /* direct.alphaMask */
+ },
+ 0, /* colormap */
+ },
+ PictFormatType |
+ PictFormatDepth |
+ PictFormatRed |
+ PictFormatRedMask |
+ PictFormatGreen |
+ PictFormatGreenMask |
+ PictFormatBlue |
+ PictFormatBlueMask |
+ PictFormatAlphaMask,
+};
+
static XRenderPictFormat *
pict_format_for_depth (Display *xdisplay, int depth)
{
- return XRenderFindStandardFormat (xdisplay, standard_pict_format_for_depth (depth));
+ if (depth != 16)
+ return XRenderFindStandardFormat (xdisplay, standard_pict_format_for_depth (depth));
+ else
+ return &RGB16_565_Format;
}
static cairo_surface_t *
--
2.12.0

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jul 6 10:39:29 CEST 2017 - vliaskovitis@suse.com
- Add RGB16_565 format to support 16-bit color depth sessions
(FATE#323412, bgo#781704, bsc#1024748)
mutter-iconcache-Support-RGB16_565-format-for-16-bit-color-.patch
-------------------------------------------------------------------
Fri Jun 23 13:18:37 UTC 2017 - zaitor@opensuse.org

View File

@ -38,6 +38,8 @@ Patch2: relax-some-constraints-on-CSD-windows-in-sle-classic.patch
Patch3: mutter-bsc984738-grab-display.patch
# PATCH-FIX-UPSTREAM mutter-fix-startup.patch bgo#768531 zaitor@opensuse.org -- Fix slow startup notification on wayland
Patch6: mutter-fix-startup.patch
# PATCH-FEATURE-UPSTREAM mutter-iconcache-Support-RGB16_565-format-for-16-bit-color-.patch FATE#323412 bgo#781704 bsc#1024748 vliaskovitis@suse.com -- iconcache: Support RGB16_565 format for 16-bit sessions
Patch7: mutter-iconcache-Support-RGB16_565-format-for-16-bit-color-.patch
BuildRequires: fdupes
BuildRequires: gobject-introspection-devel >= 0.9.5
BuildRequires: libSM-devel
@ -99,9 +101,9 @@ from Metacity.
%package -n libmutter-0-0
Summary: Window and compositing manager based on Clutter
Group: System/Libraries
# we need the gsettings schema; hopefully, they'll stay backwards compatible
# (since we can't require = version, to not break SLPP)
Group: System/Libraries
Requires: %{name}-data >= %{version}
Obsoletes: libmutter0
@ -143,6 +145,7 @@ translation-update-upstream
%patch3 -p1
%endif
%patch6 -p1
%patch7 -p1
%build
%configure \