parent
							
								
									87de2266cb
								
							
						
					
					
						commit
						d12509b7f6
					
				| @ -0,0 +1,37 @@ | |||||||
|  | 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 | ||||||
|  | 
 | ||||||
| @ -5,7 +5,7 @@ | |||||||
| 
 | 
 | ||||||
| Name:          mutter | Name:          mutter | ||||||
| Version:       3.23.91 | Version:       3.23.91 | ||||||
| Release:       1%{?dist} | Release:       2%{?dist} | ||||||
| Summary:       Window and compositing manager based on Clutter | Summary:       Window and compositing manager based on Clutter | ||||||
| 
 | 
 | ||||||
| License:       GPLv2+ | License:       GPLv2+ | ||||||
| @ -14,6 +14,9 @@ URL:           http://www.gnome.org | |||||||
| Source0:       http://download.gnome.org/sources/%{name}/3.23/%{name}-%{version}.tar.xz | Source0:       http://download.gnome.org/sources/%{name}/3.23/%{name}-%{version}.tar.xz | ||||||
| 
 | 
 | ||||||
| Patch0:        startup-notification.patch | Patch0:        startup-notification.patch | ||||||
|  | # Backport of fix for color issue 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 | ||||||
| 
 | 
 | ||||||
| BuildRequires: chrpath | BuildRequires: chrpath | ||||||
| BuildRequires: pango-devel | BuildRequires: pango-devel | ||||||
| @ -108,6 +111,7 @@ the functionality of the installed %{name} package. | |||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| #patch0 -p1 | #patch0 -p1 | ||||||
|  | %patch1 -p1 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| autoreconf -f -i | autoreconf -f -i | ||||||
| @ -180,6 +184,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : | |||||||
| %{_datadir}/mutter/tests | %{_datadir}/mutter/tests | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Mar 02 2017 Adam Williamson <awilliam@redhat.com> - 3.23.91-2 | ||||||
|  | - Backport fix for a color issue in 3.23.91 (BGO #779234, RHBZ #1428559) | ||||||
|  | 
 | ||||||
| * Wed Mar 01 2017 Florian Müllner <fmuellner@redhat.com> - 3.23.91-1 | * Wed Mar 01 2017 Florian Müllner <fmuellner@redhat.com> - 3.23.91-1 | ||||||
| - Update to 3.23.91 | - Update to 3.23.91 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user