Update to 3.23.92

This commit is contained in:
Florian Müllner 2017-03-14 03:14:30 +01:00
parent e13fe93f91
commit 0c819181f5
6 changed files with 7 additions and 256 deletions

1
.gitignore vendored
View File

@ -120,3 +120,4 @@ mutter-2.31.5.tar.bz2
/mutter-3.23.2.tar.xz
/mutter-3.23.90.tar.xz
/mutter-3.23.91.tar.xz
/mutter-3.23.92.tar.xz

View File

@ -1,162 +0,0 @@
From aa5738c777883f270ae9cb3b2988d194792fed75 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 3 Mar 2017 17:11:19 +0100
Subject: [PATCH 1/2] cogl: Add pixel_format_to_gl_with_target driver vfunc
This is used by the GL driver in order to determine whether swizzling
actually applies given the bitmap and target texture internal format.
If both agree that they store BGRA, then swizzling may apply.
https://bugzilla.gnome.org/show_bug.cgi?id=779234
---
cogl/cogl/cogl-driver.h | 7 +++++++
cogl/cogl/driver/gl/gl/cogl-driver-gl.c | 29 +++++++++++++++++++++++------
cogl/cogl/driver/gl/gles/cogl-driver-gles.c | 26 +++++++++++++++++++++-----
cogl/cogl/driver/nop/cogl-driver-nop.c | 1 +
4 files changed, 52 insertions(+), 11 deletions(-)
diff --git a/cogl/cogl/cogl-driver.h b/cogl/cogl/cogl-driver.h
index 648228c6f..85aa0d870 100644
--- a/cogl/cogl/cogl-driver.h
+++ b/cogl/cogl/cogl-driver.h
@@ -55,6 +55,13 @@ struct _CoglDriverVtable
GLenum *out_glintformat,
GLenum *out_glformat,
GLenum *out_gltype);
+ CoglPixelFormat
+ (* pixel_format_to_gl_with_target) (CoglContext *context,
+ CoglPixelFormat format,
+ CoglPixelFormat target_format,
+ GLenum *out_glintformat,
+ GLenum *out_glformat,
+ GLenum *out_gltype);
CoglBool
(* update_features) (CoglContext *context,
diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
index 1cc63e82f..178262ac0 100644
--- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -96,11 +96,12 @@ _cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
}
static CoglPixelFormat
-_cogl_driver_pixel_format_to_gl (CoglContext *context,
- CoglPixelFormat format,
- GLenum *out_glintformat,
- GLenum *out_glformat,
- GLenum *out_gltype)
+_cogl_driver_pixel_format_to_gl_with_target (CoglContext *context,
+ CoglPixelFormat format,
+ CoglPixelFormat target_format,
+ GLenum *out_glintformat,
+ GLenum *out_glformat,
+ GLenum *out_gltype)
{
CoglPixelFormat required_format;
GLenum glintformat = 0;
@@ -178,7 +179,8 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
* and buffer format are the same here, the pixels
* will be flipped through this extension.
*/
- if (_cogl_has_private_feature
+ if (target_format == format &&
+ _cogl_has_private_feature
(context, COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE))
glformat = GL_RGBA;
else
@@ -297,6 +299,20 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
return required_format;
}
+static CoglPixelFormat
+_cogl_driver_pixel_format_to_gl (CoglContext *context,
+ CoglPixelFormat format,
+ GLenum *out_glintformat,
+ GLenum *out_glformat,
+ GLenum *out_gltype)
+{
+ return _cogl_driver_pixel_format_to_gl_with_target (context,
+ format, format,
+ out_glintformat,
+ out_glformat,
+ out_gltype);
+}
+
static CoglBool
_cogl_get_gl_version (CoglContext *ctx,
int *major_out,
@@ -677,6 +693,7 @@ _cogl_driver_gl =
{
_cogl_driver_pixel_format_from_gl_internal,
_cogl_driver_pixel_format_to_gl,
+ _cogl_driver_pixel_format_to_gl_with_target,
_cogl_driver_update_features,
_cogl_offscreen_gl_allocate,
_cogl_offscreen_gl_free,
diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
index bf63fcc16..521f6ef3d 100644
--- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -67,11 +67,12 @@ _cogl_driver_pixel_format_from_gl_internal (CoglContext *context,
}
static CoglPixelFormat
-_cogl_driver_pixel_format_to_gl (CoglContext *context,
- CoglPixelFormat format,
- GLenum *out_glintformat,
- GLenum *out_glformat,
- GLenum *out_gltype)
+_cogl_driver_pixel_format_to_gl_with_target (CoglContext *context,
+ CoglPixelFormat format,
+ CoglPixelFormat target_format,
+ GLenum *out_glintformat,
+ GLenum *out_glformat,
+ GLenum *out_gltype)
{
CoglPixelFormat required_format;
GLenum glintformat;
@@ -219,6 +220,20 @@ _cogl_driver_pixel_format_to_gl (CoglContext *context,
return required_format;
}
+static CoglPixelFormat
+_cogl_driver_pixel_format_to_gl (CoglContext *context,
+ CoglPixelFormat format,
+ GLenum *out_glintformat,
+ GLenum *out_glformat,
+ GLenum *out_gltype)
+{
+ return _cogl_driver_pixel_format_to_gl_with_target (context,
+ format, format,
+ out_glintformat,
+ out_glformat,
+ out_gltype);
+}
+
static CoglBool
_cogl_get_gl_version (CoglContext *ctx,
int *major_out,
@@ -457,6 +472,7 @@ _cogl_driver_gles =
{
_cogl_driver_pixel_format_from_gl_internal,
_cogl_driver_pixel_format_to_gl,
+ _cogl_driver_pixel_format_to_gl_with_target,
_cogl_driver_update_features,
_cogl_offscreen_gl_allocate,
_cogl_offscreen_gl_free,
diff --git a/cogl/cogl/driver/nop/cogl-driver-nop.c b/cogl/cogl/driver/nop/cogl-driver-nop.c
index d9b1d0f1f..6e04e7164 100644
--- a/cogl/cogl/driver/nop/cogl-driver-nop.c
+++ b/cogl/cogl/driver/nop/cogl-driver-nop.c
@@ -61,6 +61,7 @@ _cogl_driver_nop =
{
NULL, /* pixel_format_from_gl_internal */
NULL, /* pixel_format_to_gl */
+ NULL, /* pixel_format_to_gl_with_target */
_cogl_driver_update_features,
_cogl_offscreen_nop_allocate,
_cogl_offscreen_nop_free,
--
2.12.0

View File

@ -1,37 +0,0 @@
From 95e9fa10ef20a23912186c0cc701ab8f5a97f1a0 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Wed, 1 Mar 2017 18:53:57 +0100
Subject: [PATCH] cogl: Read pixels in the correct 32bit format as per the
given bitmap
Fixes the gnome-shell screenshot tool from getting colors with the
wrong byte order.
https://bugzilla.gnome.org/show_bug.cgi?id=779234
---
cogl/cogl/driver/gl/cogl-framebuffer-gl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
index 18ba08ab9..2af36f0bc 100644
--- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -1418,6 +1418,15 @@ _cogl_framebuffer_gl_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
&gl_format,
&gl_type);
+ /* As we are reading pixels, we want to consider the bitmap according to
+ * its real pixel format, not the swizzled channels we pretend face to the
+ * pipeline.
+ */
+ if ((format == COGL_PIXEL_FORMAT_BGRA_8888 ||
+ format == COGL_PIXEL_FORMAT_BGRA_8888_PRE) &&
+ _cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE))
+ gl_format = GL_BGRA;
+
/* NB: All offscreen rendering is done upside down so there is no need
* to flip in this case... */
if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_MESA_PACK_INVERT) &&
--
2.12.0

View File

@ -1,44 +0,0 @@
From 35388fb33cb39a311b4ccc504ac15a6c5d226dab Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Fri, 3 Mar 2017 17:13:10 +0100
Subject: [PATCH 2/2] cogl: Use pixel_format_to_gl_with_target on bitmap
uploading paths
We already do have a texture with an internal format in these paths,
so we should check the required format according to it.
This fixes CoglAtlasTexture (and CoglPangoRenderer indirectly), as
it forces a RGBA format on its texture, but pixel_format_to_gl()
anyway assumed swizzling is performed on the texture, while it is
not the case.
https://bugzilla.gnome.org/show_bug.cgi?id=779234
---
cogl/cogl/driver/gl/cogl-texture-2d-gl.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
index 375edcb14..d1eff4507 100644
--- a/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
+++ b/cogl/cogl/driver/gl/cogl-texture-2d-gl.c
@@ -772,11 +772,12 @@ _cogl_texture_2d_gl_copy_from_bitmap (CoglTexture2D *tex_2d,
upload_format = cogl_bitmap_get_format (upload_bmp);
- ctx->driver_vtable->pixel_format_to_gl (ctx,
- upload_format,
- NULL, /* internal format */
- &gl_format,
- &gl_type);
+ ctx->driver_vtable->pixel_format_to_gl_with_target (ctx,
+ upload_format,
+ _cogl_texture_get_format (tex),
+ NULL, /* internal gl format */
+ &gl_format,
+ &gl_type);
/* If this touches the first pixel then we'll update our copy */
if (dst_x == 0 && dst_y == 0 &&
--
2.12.0

View File

@ -4,8 +4,8 @@
%global libinput_version 1.4
Name: mutter
Version: 3.23.91
Release: 4%{?dist}
Version: 3.23.92
Release: 1%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -14,13 +14,6 @@ URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/%{name}/3.23/%{name}-%{version}.tar.xz
Patch0: startup-notification.patch
# Backport of fixes for color issues in 3.23.91:
# https://git.gnome.org/browse/mutter/commit/?id=95e9fa10ef20a23912186c0cc701ab8f5a97f1a0
Patch1: 0001-cogl-Read-pixels-in-the-correct-32bit-format-as-per-.patch
# https://git.gnome.org/browse/mutter/commit/?id=aa5738c777883f270ae9cb3b2988d194792fed75
Patch2: 0001-cogl-Add-pixel_format_to_gl_with_target-driver-vfunc.patch
# https://git.gnome.org/browse/mutter/commit/?id=35388fb33cb39a311b4ccc504ac15a6c5d226dab
Patch3: 0002-cogl-Use-pixel_format_to_gl_with_target-on-bitmap-up.patch
BuildRequires: chrpath
BuildRequires: pango-devel
@ -115,9 +108,6 @@ the functionality of the installed %{name} package.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -f -i
@ -190,6 +180,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/mutter/tests
%changelog
* Tue Mar 14 2017 Florian Müllner <fmuellner@redhat.com> - 3.23.92-1
- Update to 3.23.92
* Fri Mar 10 2017 Florian Müllner <fmuellner@redhat.com> - 3.23.91-4
- Apply startup-notification hack again

View File

@ -1 +1 @@
SHA512 (mutter-3.23.91.tar.xz) = 77491a699e03ec3d7483c318f46a2d769adf0679e27aa231f508282ea1cfdec828d711b8950f006334ae86f40978f270c3d19abbe8040072dabe9557bad4398e
SHA512 (mutter-3.23.92.tar.xz) = 1aea3854cad0d1829646eeb4bd6fec8ec78478c7a1e6c0f24f51048b2879c8528fa969348d52e6e693d822a03710dca7842fc174b6466fa4749d6dec13af0f27