Update to 1.26.4
This commit is contained in:
parent
3d9bc75c89
commit
7bda6acc5b
183
10.patch
183
10.patch
@ -1,183 +0,0 @@
|
|||||||
From 9b6d501726e4327db13f6516d229ec43e3cd44e0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Floris Van den Abeele <florisvda@gmail.com>
|
|
||||||
Date: Sat, 7 Sep 2019 21:52:36 +0200
|
|
||||||
Subject: [PATCH 1/2] Handle 8 and 10 bits colour depth in picking code (#11)
|
|
||||||
|
|
||||||
---
|
|
||||||
clutter/clutter-main.c | 52 ++++++++++++++++++++++++++----------------
|
|
||||||
1 file changed, 32 insertions(+), 20 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
|
|
||||||
index 3e4335ec4..bae74aaf4 100644
|
|
||||||
--- a/clutter/clutter-main.c
|
|
||||||
+++ b/clutter/clutter-main.c
|
|
||||||
@@ -587,6 +587,9 @@ _clutter_id_to_color (guint id_,
|
|
||||||
{
|
|
||||||
ClutterMainContext *ctx;
|
|
||||||
gint red, green, blue;
|
|
||||||
+ /* keep track of the bit depth of the RGB channels of the framebuffers (i.e.
|
|
||||||
+ * either 8 or 10) */
|
|
||||||
+ gint bpc;
|
|
||||||
|
|
||||||
ctx = _clutter_context_get_default ();
|
|
||||||
|
|
||||||
@@ -610,13 +613,16 @@ _clutter_id_to_color (guint id_,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ bpc = ctx->fb_r_mask;
|
|
||||||
+ g_assert (bpc == 8 || bpc == 10);
|
|
||||||
+
|
|
||||||
/* compute the numbers we'll store in the components */
|
|
||||||
red = (id_ >> (ctx->fb_g_mask_used+ctx->fb_b_mask_used))
|
|
||||||
- & (0xff >> (8-ctx->fb_r_mask_used));
|
|
||||||
+ & (0xff >> (bpc-ctx->fb_r_mask_used));
|
|
||||||
green = (id_ >> ctx->fb_b_mask_used)
|
|
||||||
- & (0xff >> (8-ctx->fb_g_mask_used));
|
|
||||||
+ & (0xff >> (bpc-ctx->fb_g_mask_used));
|
|
||||||
blue = (id_)
|
|
||||||
- & (0xff >> (8-ctx->fb_b_mask_used));
|
|
||||||
+ & (0xff >> (bpc-ctx->fb_b_mask_used));
|
|
||||||
|
|
||||||
/* shift left bits a bit and add one, this circumvents
|
|
||||||
* at least some potential rounding errors in GL/GLES
|
|
||||||
@@ -629,10 +635,10 @@ _clutter_id_to_color (guint id_,
|
|
||||||
if (ctx->fb_b_mask_used != ctx->fb_b_mask)
|
|
||||||
blue = blue * 2;
|
|
||||||
|
|
||||||
- /* shift up to be full 8bit values */
|
|
||||||
- red = (red << (8 - ctx->fb_r_mask)) | (0x7f >> (ctx->fb_r_mask_used));
|
|
||||||
- green = (green << (8 - ctx->fb_g_mask)) | (0x7f >> (ctx->fb_g_mask_used));
|
|
||||||
- blue = (blue << (8 - ctx->fb_b_mask)) | (0x7f >> (ctx->fb_b_mask_used));
|
|
||||||
+ /* shift up to occupy the full bit depth of the channel */
|
|
||||||
+ red = (red << (bpc - ctx->fb_r_mask)) | (0x7f >> (ctx->fb_r_mask_used));
|
|
||||||
+ green = (green << (bpc - ctx->fb_g_mask)) | (0x7f >> (ctx->fb_g_mask_used));
|
|
||||||
+ blue = (blue << (bpc - ctx->fb_b_mask)) | (0x7f >> (ctx->fb_b_mask_used));
|
|
||||||
|
|
||||||
col->red = red;
|
|
||||||
col->green = green;
|
|
||||||
@@ -646,9 +652,9 @@ _clutter_id_to_color (guint id_,
|
|
||||||
*/
|
|
||||||
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS))
|
|
||||||
{
|
|
||||||
- col->red = (col->red << 4) | (col->red >> 4);
|
|
||||||
- col->green = (col->green << 4) | (col->green >> 4);
|
|
||||||
- col->blue = (col->blue << 4) | (col->blue >> 4);
|
|
||||||
+ col->red = (col->red << bpc/2) | (col->red >> bpc/2);
|
|
||||||
+ col->green = (col->green << bpc/2) | (col->green >> bpc/2);
|
|
||||||
+ col->blue = (col->blue << bpc/2) | (col->blue >> bpc/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -658,11 +664,17 @@ _clutter_pixel_to_id (guchar pixel[4])
|
|
||||||
ClutterMainContext *ctx;
|
|
||||||
gint red, green, blue;
|
|
||||||
guint retval;
|
|
||||||
+ /* keep track of the bit depth of the RGB channels of the framebuffers (i.e.
|
|
||||||
+ * either 8 or 10) */
|
|
||||||
+ gint bpc;
|
|
||||||
|
|
||||||
ctx = _clutter_context_get_default ();
|
|
||||||
|
|
||||||
+ bpc = ctx->fb_r_mask;
|
|
||||||
+ g_assert (bpc == 8 || bpc == 10);
|
|
||||||
+
|
|
||||||
/* reduce the pixel components to the number of bits actually used of the
|
|
||||||
- * 8bits.
|
|
||||||
+ * bit depth of the channel (i.e. 8 or 10 bits)
|
|
||||||
*/
|
|
||||||
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS))
|
|
||||||
{
|
|
||||||
@@ -673,18 +685,18 @@ _clutter_pixel_to_id (guchar pixel[4])
|
|
||||||
* identifiers (otherwise pick buffers dumped to an image will pretty
|
|
||||||
* much just look black.) Here we reverse that rotation.
|
|
||||||
*/
|
|
||||||
- tmp = ((pixel[0] << 4) | (pixel[0] >> 4));
|
|
||||||
- red = tmp >> (8 - ctx->fb_r_mask);
|
|
||||||
- tmp = ((pixel[1] << 4) | (pixel[1] >> 4));
|
|
||||||
- green = tmp >> (8 - ctx->fb_g_mask);
|
|
||||||
- tmp = ((pixel[2] << 4) | (pixel[2] >> 4));
|
|
||||||
- blue = tmp >> (8 - ctx->fb_b_mask);
|
|
||||||
+ tmp = ((pixel[0] << bpc/2) | (pixel[0] >> bpc/2));
|
|
||||||
+ red = tmp >> (bpc - ctx->fb_r_mask);
|
|
||||||
+ tmp = ((pixel[1] << bpc/2) | (pixel[1] >> bpc/2));
|
|
||||||
+ green = tmp >> (bpc - ctx->fb_g_mask);
|
|
||||||
+ tmp = ((pixel[2] << bpc/2) | (pixel[2] >> bpc/2));
|
|
||||||
+ blue = tmp >> (bpc - ctx->fb_b_mask);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
- red = pixel[0] >> (8 - ctx->fb_r_mask);
|
|
||||||
- green = pixel[1] >> (8 - ctx->fb_g_mask);
|
|
||||||
- blue = pixel[2] >> (8 - ctx->fb_b_mask);
|
|
||||||
+ red = pixel[0] >> (bpc - ctx->fb_r_mask);
|
|
||||||
+ green = pixel[1] >> (bpc - ctx->fb_g_mask);
|
|
||||||
+ blue = pixel[2] >> (bpc - ctx->fb_b_mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* divide potentially by two if 'fuzzy' */
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
||||||
|
|
||||||
From 6134c915fd66fdb4c6b89b0547e68ac8edc62a08 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Floris Van den Abeele <florisvda@gmail.com>
|
|
||||||
Date: Mon, 7 Oct 2019 22:55:48 +0200
|
|
||||||
Subject: [PATCH 2/2] Fix coding style issues in MR !10
|
|
||||||
|
|
||||||
---
|
|
||||||
clutter/clutter-main.c | 20 ++++++++++----------
|
|
||||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
|
|
||||||
index bae74aaf4..89b2f9e6b 100644
|
|
||||||
--- a/clutter/clutter-main.c
|
|
||||||
+++ b/clutter/clutter-main.c
|
|
||||||
@@ -617,12 +617,12 @@ _clutter_id_to_color (guint id_,
|
|
||||||
g_assert (bpc == 8 || bpc == 10);
|
|
||||||
|
|
||||||
/* compute the numbers we'll store in the components */
|
|
||||||
- red = (id_ >> (ctx->fb_g_mask_used+ctx->fb_b_mask_used))
|
|
||||||
- & (0xff >> (bpc-ctx->fb_r_mask_used));
|
|
||||||
+ red = (id_ >> (ctx->fb_g_mask_used + ctx->fb_b_mask_used))
|
|
||||||
+ & (0xff >> (bpc - ctx->fb_r_mask_used));
|
|
||||||
green = (id_ >> ctx->fb_b_mask_used)
|
|
||||||
- & (0xff >> (bpc-ctx->fb_g_mask_used));
|
|
||||||
+ & (0xff >> (bpc - ctx->fb_g_mask_used));
|
|
||||||
blue = (id_)
|
|
||||||
- & (0xff >> (bpc-ctx->fb_b_mask_used));
|
|
||||||
+ & (0xff >> (bpc - ctx->fb_b_mask_used));
|
|
||||||
|
|
||||||
/* shift left bits a bit and add one, this circumvents
|
|
||||||
* at least some potential rounding errors in GL/GLES
|
|
||||||
@@ -652,9 +652,9 @@ _clutter_id_to_color (guint id_,
|
|
||||||
*/
|
|
||||||
if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS))
|
|
||||||
{
|
|
||||||
- col->red = (col->red << bpc/2) | (col->red >> bpc/2);
|
|
||||||
- col->green = (col->green << bpc/2) | (col->green >> bpc/2);
|
|
||||||
- col->blue = (col->blue << bpc/2) | (col->blue >> bpc/2);
|
|
||||||
+ col->red = (col->red << bpc / 2) | (col->red >> bpc / 2);
|
|
||||||
+ col->green = (col->green << bpc / 2) | (col->green >> bpc / 2);
|
|
||||||
+ col->blue = (col->blue << bpc / 2) | (col->blue >> bpc / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -685,11 +685,11 @@ _clutter_pixel_to_id (guchar pixel[4])
|
|
||||||
* identifiers (otherwise pick buffers dumped to an image will pretty
|
|
||||||
* much just look black.) Here we reverse that rotation.
|
|
||||||
*/
|
|
||||||
- tmp = ((pixel[0] << bpc/2) | (pixel[0] >> bpc/2));
|
|
||||||
+ tmp = ((pixel[0] << bpc / 2) | (pixel[0] >> bpc / 2));
|
|
||||||
red = tmp >> (bpc - ctx->fb_r_mask);
|
|
||||||
- tmp = ((pixel[1] << bpc/2) | (pixel[1] >> bpc/2));
|
|
||||||
+ tmp = ((pixel[1] << bpc / 2) | (pixel[1] >> bpc / 2));
|
|
||||||
green = tmp >> (bpc - ctx->fb_g_mask);
|
|
||||||
- tmp = ((pixel[2] << bpc/2) | (pixel[2] >> bpc/2));
|
|
||||||
+ tmp = ((pixel[2] << bpc / 2) | (pixel[2] >> bpc / 2));
|
|
||||||
blue = tmp >> (bpc - ctx->fb_b_mask);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
15
clutter.spec
15
clutter.spec
@ -2,25 +2,21 @@
|
|||||||
|
|
||||||
%global with_tests 1
|
%global with_tests 1
|
||||||
|
|
||||||
%global glib2_version 2.44.0
|
%global glib2_version 2.53.4
|
||||||
%global cogl_version 1.21.2
|
%global cogl_version 1.21.2
|
||||||
%global json_glib_version 0.12.0
|
%global json_glib_version 0.12.0
|
||||||
%global cairo_version 1.14.0
|
%global cairo_version 1.14.0
|
||||||
%global libinput_version 0.19.0
|
%global libinput_version 0.19.0
|
||||||
|
|
||||||
Name: clutter
|
Name: clutter
|
||||||
Version: 1.26.2
|
Version: 1.26.4
|
||||||
Release: 11%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Open Source software library for creating rich graphical user interfaces
|
Summary: Open Source software library for creating rich graphical user interfaces
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.clutter-project.org/
|
URL: http://www.clutter-project.org/
|
||||||
Source0: https://download.gnome.org/sources/%{name}/1.26/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/%{name}/1.26/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
# Backport fixes for 10-bit color
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1800865
|
|
||||||
Patch0: 10.patch
|
|
||||||
|
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: pkgconfig(atk)
|
BuildRequires: pkgconfig(atk)
|
||||||
BuildRequires: pkgconfig(cairo-gobject) >= %{cairo_version}
|
BuildRequires: pkgconfig(cairo-gobject) >= %{cairo_version}
|
||||||
@ -113,7 +109,7 @@ find %{buildroot} -name '*.la' -delete
|
|||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%files -f clutter-1.0.lang
|
%files -f clutter-1.0.lang
|
||||||
%doc NEWS README
|
%doc NEWS README.md
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{_libdir}/*.so.0
|
%{_libdir}/*.so.0
|
||||||
%{_libdir}/*.so.0.*
|
%{_libdir}/*.so.0.*
|
||||||
@ -135,6 +131,9 @@ find %{buildroot} -name '*.la' -delete
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 09 2020 Kalev Lember <klember@redhat.com> - 1.26.4-1
|
||||||
|
- Update to 1.26.4
|
||||||
|
|
||||||
* Tue Mar 03 2020 Kalev Lember <klember@redhat.com> - 1.26.2-11
|
* Tue Mar 03 2020 Kalev Lember <klember@redhat.com> - 1.26.2-11
|
||||||
- Backport fixes for 10-bit color (#1800865)
|
- Backport fixes for 10-bit color (#1800865)
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (clutter-1.26.2.tar.xz) = c8008a1a1f111313d9abaff8d4415f112ddc32a02e08845f3735d33bb25b72b082f133daba06749bb9595eaf1ba83b308d30a413fbbe8dcdc1afdd7077a30937
|
SHA512 (clutter-1.26.4.tar.xz) = 6d43ac09df7671fa2bda74d1231166e8331f3ef1dbe0d167225033b3ddae7377d1062db81b73fc498c2e9f0db467bf4febb7306a6f40c9ef0266dac2a397f43a
|
||||||
|
Loading…
Reference in New Issue
Block a user