From 0142ca38514b7b44cfaeb39683a1b2187a08e496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 21 Feb 2018 01:27:49 +0100 Subject: [PATCH] Update to 3.27.91 --- .gitignore | 1 + fix-gl-includes.patch | 131 ----------- mutter.spec | 13 +- screen-cast-pipewire-0.1.8-API.patch | 311 --------------------------- sources | 2 +- 5 files changed, 7 insertions(+), 451 deletions(-) delete mode 100644 fix-gl-includes.patch delete mode 100644 screen-cast-pipewire-0.1.8-API.patch diff --git a/.gitignore b/.gitignore index c27aa11..873f07c 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,4 @@ mutter-2.31.5.tar.bz2 /mutter-3.26.0.tar.xz /mutter-3.26.1.tar.xz /mutter-3.27.1.tar.xz +/mutter-3.27.91.tar.xz diff --git a/fix-gl-includes.patch b/fix-gl-includes.patch deleted file mode 100644 index eedbab3..0000000 --- a/fix-gl-includes.patch +++ /dev/null @@ -1,131 +0,0 @@ -From f5cd787a70efd0c4389a784d5aa1ab3de4b526dc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Mon, 30 Oct 2017 16:07:30 +0800 -Subject: [PATCH 1/3] renderer-native-gles3: Don't pass GPU when rendering - -It wasn't used for anything, so don't pass it. - -https://bugzilla.gnome.org/show_bug.cgi?id=788695 ---- - src/backends/native/meta-renderer-native-gles3.c | 1 - - src/backends/native/meta-renderer-native-gles3.h | 2 -- - src/backends/native/meta-renderer-native.c | 1 - - 3 files changed, 4 deletions(-) - -diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c -index daab1fcba..40237be01 100644 ---- a/src/backends/native/meta-renderer-native-gles3.c -+++ b/src/backends/native/meta-renderer-native-gles3.c -@@ -103,7 +103,6 @@ paint_egl_image (MetaGles3 *gles3, - gboolean - meta_renderer_native_gles3_blit_shared_bo (MetaEgl *egl, - MetaGles3 *gles3, -- MetaGpuKms *gpu_kms, - EGLDisplay egl_display, - EGLContext egl_context, - EGLSurface egl_surface, -diff --git a/src/backends/native/meta-renderer-native-gles3.h b/src/backends/native/meta-renderer-native-gles3.h -index 51893636a..b4ca19285 100644 ---- a/src/backends/native/meta-renderer-native-gles3.h -+++ b/src/backends/native/meta-renderer-native-gles3.h -@@ -27,11 +27,9 @@ - - #include "backends/meta-egl.h" - #include "backends/meta-gles3.h" --#include "backends/native/meta-gpu-kms.h" - - gboolean meta_renderer_native_gles3_blit_shared_bo (MetaEgl *egl, - MetaGles3 *gles3, -- MetaGpuKms *gpu_kms, - EGLDisplay egl_display, - EGLContext egl_context, - EGLSurface egl_surface, -diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c -index 66c254f06..613790848 100644 ---- a/src/backends/native/meta-renderer-native.c -+++ b/src/backends/native/meta-renderer-native.c -@@ -1356,7 +1356,6 @@ copy_shared_framebuffer_gpu (CoglOnscreen *onscreen, - - if (!meta_renderer_native_gles3_blit_shared_bo (egl, - renderer_native->gles3, -- secondary_gpu_state->gpu_kms, - renderer_gpu_data->egl_display, - renderer_gpu_data->secondary.egl_context, - secondary_gpu_state->egl_surface, --- -2.14.2 - - -From fdbc72431c916f8aa67391a1d2147136a8eeca94 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Mon, 30 Oct 2017 16:08:12 +0800 -Subject: [PATCH 2/3] renderer-native-gles3: Remove unnecessary includes - -They caused conflicts on i686 as GL/gl.h was included by cogl. - -https://bugzilla.gnome.org/show_bug.cgi?id=788695 ---- - src/backends/native/meta-renderer-native-gles3.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c -index 40237be01..2aaae7619 100644 ---- a/src/backends/native/meta-renderer-native-gles3.c -+++ b/src/backends/native/meta-renderer-native-gles3.c -@@ -27,12 +27,12 @@ - #include "backends/native/meta-renderer-native-gles3.h" - - #include -+#include - #include -+#include - --#include "backends/meta-backend-private.h" - #include "backends/meta-gles3.h" - #include "backends/meta-gles3-table.h" --#include "backends/native/meta-renderer-native.h" - - static EGLImageKHR - create_egl_image (MetaEgl *egl, --- -2.14.2 - - -From 5e192c970c513e1c6a7459f0acb33a47cf0bed25 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Mon, 30 Oct 2017 16:08:46 +0800 -Subject: [PATCH 3/3] renderer-native-gles3: Add cpp error out if gl.h was - included - -On some architectures, including both GLES3/gl3.h GL/gl.h will cause -compilation issues due to incompatible type definitions. To avoid -running into that issue while building on other architectures, make -sure we haven't included GL/gl.h by accident. - -https://bugzilla.gnome.org/show_bug.cgi?id=788695 ---- - src/backends/native/meta-renderer-native-gles3.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c -index 2aaae7619..0914dfe1d 100644 ---- a/src/backends/native/meta-renderer-native-gles3.c -+++ b/src/backends/native/meta-renderer-native-gles3.c -@@ -34,6 +34,14 @@ - #include "backends/meta-gles3.h" - #include "backends/meta-gles3-table.h" - -+/* -+ * GL/gl.h being included may conflit with gl3.h on some architectures. -+ * Make sure that hasn't happened on any architecture. -+ */ -+#ifdef GL_VERSION_1_1 -+#error "Somehow included OpenGL headers when we shouldn't have" -+#endif -+ - static EGLImageKHR - create_egl_image (MetaEgl *egl, - EGLDisplay egl_display, --- -2.14.2 - diff --git a/mutter.spec b/mutter.spec index 6ac87be..635824c 100644 --- a/mutter.spec +++ b/mutter.spec @@ -6,8 +6,8 @@ %global pipewire_version 0.1.4 Name: mutter -Version: 3.27.1 -Release: 4%{?dist} +Version: 3.27.91 +Release: 1%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -17,12 +17,6 @@ Source0: http://download.gnome.org/sources/%{name}/3.27/%{name}-%{version} Patch0: startup-notification.patch -Patch1: fix-gl-includes.patch - -# https://github.com/GNOME/mutter/commit/c063d43be84dd445a02700c7bb1bf77aea65bb61 -# https://bugzilla.gnome.org/show_bug.cgi?id=792854 -Patch2: screen-cast-pipewire-0.1.8-API.patch - BuildRequires: chrpath BuildRequires: pango-devel BuildRequires: startup-notification-devel @@ -186,6 +180,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %{_datadir}/mutter/tests %changelog +* Wed Feb 21 2018 Florian Müllner - 3.27.91-1 +- Update to 3.27.91 + * Tue Feb 13 2018 Björn Esser - 3.27.1-4 - Rebuild against newer gnome-desktop3 package - Add patch for adjustments to pipewire 0.1.8 API diff --git a/screen-cast-pipewire-0.1.8-API.patch b/screen-cast-pipewire-0.1.8-API.patch deleted file mode 100644 index 8d765b1..0000000 --- a/screen-cast-pipewire-0.1.8-API.patch +++ /dev/null @@ -1,311 +0,0 @@ -From c063d43be84dd445a02700c7bb1bf77aea65bb61 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= -Date: Wed, 24 Jan 2018 15:25:59 +0800 -Subject: [PATCH] screen-cast: Update to pipewire 0.1.8 API - -Remove per micro version code, the API changed too much to keep both in -place. - -https://bugzilla.gnome.org/show_bug.cgi?id=792854 ---- - configure.ac | 6 +- - src/backends/meta-screen-cast-stream-src.c | 155 +++++++++++------------------ - 2 files changed, 58 insertions(+), 103 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7399f741a..78d9d3362 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -245,11 +245,7 @@ AC_ARG_ENABLE(remote-desktop, - enable_remote_desktop=no - ) - AS_IF([test "$enable_remote_desktop" = "yes"], [ -- MUTTER_PC_MODULES="$MUTTER_PC_MODULES libpipewire-0.1 >= 0.1.4" -- PKG_CHECK_EXISTS([libpipewire-0.1], [ -- pw_micro=`$PKG_CONFIG --modversion libpipewire-0.1 | cut -d. -f3` -- AC_DEFINE_UNQUOTED([PIPEWIRE_VERSION_MICRO],[$pw_micro], [Pipewire micro version used]) -- ]) -+ MUTTER_PC_MODULES="$MUTTER_PC_MODULES libpipewire-0.1 >= 0.1.8" - AC_DEFINE([HAVE_REMOTE_DESKTOP],[1], [Defined if screen cast and remote desktop support is enabled]) - ]) - AM_CONDITIONAL([HAVE_REMOTE_DESKTOP],[test "$enable_remote_desktop" = "yes"]) -diff --git a/src/backends/meta-screen-cast-stream-src.c b/src/backends/meta-screen-cast-stream-src.c -index 0343ea458..cef49a13a 100644 ---- a/src/backends/meta-screen-cast-stream-src.c -+++ b/src/backends/meta-screen-cast-stream-src.c -@@ -26,11 +26,9 @@ - - #include - #include --#include --#include --#include --#include --#include -+#include -+#include -+#include - #include - #include - -@@ -61,10 +59,6 @@ static guint signals[N_SIGNALS]; - - typedef struct _MetaSpaType - { -- uint32_t format; -- uint32_t props; -- struct spa_type_meta meta; -- struct spa_type_data data; - struct spa_type_media_type media_type; - struct spa_type_media_subtype media_subtype; - struct spa_type_format_video format_video; -@@ -94,7 +88,6 @@ typedef struct _MetaScreenCastStreamSrcPrivate - struct spa_hook pipewire_stream_listener; - - MetaSpaType spa_type; -- uint8_t params_buffer[1024]; - struct spa_video_info_raw video_format; - - uint64_t last_frame_timestamp_us; -@@ -110,12 +103,7 @@ G_DEFINE_TYPE_WITH_CODE (MetaScreenCastStreamSrc, - meta_screen_cast_stream_src_init_initable_iface) - G_ADD_PRIVATE (MetaScreenCastStreamSrc)) - --#define PROP(f, key, type, ...) \ -- SPA_POD_PROP (f, key, 0, type, 1, __VA_ARGS__) --#define PROP_U_MM(f, key, type, ...) \ -- SPA_POD_PROP (f, key, (SPA_POD_PROP_FLAG_UNSET | \ -- SPA_POD_PROP_RANGE_MIN_MAX), \ -- type, 3, __VA_ARGS__) -+#define PROP_RANGE(min, max) 2, (min), (max) - - static void - meta_screen_cast_stream_src_get_specs (MetaScreenCastStreamSrc *src, -@@ -166,7 +154,7 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src) - - buffer = pw_stream_peek_buffer (priv->pipewire_stream, buffer_id); - -- if (buffer->datas[0].type == priv->spa_type.data.MemFd) -+ if (buffer->datas[0].type == priv->pipewire_type->data.MemFd) - { - map = mmap (NULL, buffer->datas[0].maxsize + buffer->datas[0].mapoffset, - PROT_READ | PROT_WRITE, MAP_SHARED, -@@ -180,7 +168,7 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src) - - data = SPA_MEMBER (map, buffer->datas[0].mapoffset, uint8_t); - } -- else if (buffer->datas[0].type == priv->spa_type.data.MemPtr) -+ else if (buffer->datas[0].type == priv->pipewire_type->data.MemPtr) - { - data = buffer->datas[0].data; - } -@@ -195,6 +183,8 @@ meta_screen_cast_stream_src_maybe_record_frame (MetaScreenCastStreamSrc *src) - if (map) - munmap (map, buffer->datas[0].maxsize + buffer->datas[0].mapoffset); - -+ buffer->datas[0].chunk->size = buffer->datas[0].maxsize; -+ - pw_stream_send_buffer (priv->pipewire_stream, buffer_id); - } - -@@ -271,23 +261,22 @@ on_stream_state_changed (void *data, - } - - static void --on_stream_format_changed (void *data, -- struct spa_format *format) -+on_stream_format_changed (void *data, -+ struct spa_pod *format) - { - MetaScreenCastStreamSrc *src = data; - MetaScreenCastStreamSrcPrivate *priv = - meta_screen_cast_stream_src_get_instance_private (src); - struct pw_type *pipewire_type = priv->pipewire_type; -- struct spa_type_param_alloc_buffers *param_alloc_buffers; -- struct spa_pod_builder pod_builder = { NULL }; -- struct spa_pod_frame object_frame; -- struct spa_pod_frame prop_frame; -- struct spa_param *params[1]; -+ uint8_t params_buffer[1024]; -+ int32_t width, height, stride, size; -+ struct spa_pod_builder pod_builder; -+ struct spa_pod *params[1]; - const int bpp = 4; - - if (!format) - { -- pw_stream_finish_format (priv->pipewire_stream, SPA_RESULT_OK, NULL, 0); -+ pw_stream_finish_format (priv->pipewire_stream, 0, NULL, 0); - return; - } - -@@ -295,31 +284,22 @@ on_stream_format_changed (void *data, - &priv->video_format, - &priv->spa_type.format_video); - -- spa_pod_builder_init (&pod_builder, -- priv->params_buffer, -- sizeof (priv->params_buffer)); -- -- param_alloc_buffers = &pipewire_type->param_alloc_buffers; -- spa_pod_builder_object (&pod_builder, &object_frame, 0, -- param_alloc_buffers->Buffers, -- PROP (&prop_frame, param_alloc_buffers->size, -- SPA_POD_TYPE_INT, -- (priv->video_format.size.width * -- priv->video_format.size.height * -- bpp)), -- PROP (&prop_frame, param_alloc_buffers->stride, -- SPA_POD_TYPE_INT, -- priv->video_format.size.width * bpp), -- PROP_U_MM (&prop_frame, param_alloc_buffers->buffers, -- SPA_POD_TYPE_INT, -- 16, 2, 16), -- PROP (&prop_frame, param_alloc_buffers->align, -- SPA_POD_TYPE_INT, -- 16)); -- params[0] = SPA_POD_BUILDER_DEREF (&pod_builder, object_frame.ref, -- struct spa_param); -- -- pw_stream_finish_format (priv->pipewire_stream, SPA_RESULT_OK, -+ width = priv->video_format.size.width; -+ height = priv->video_format.size.height; -+ stride = SPA_ROUND_UP_N (width * bpp, 4); -+ size = height * stride; -+ -+ pod_builder = SPA_POD_BUILDER_INIT (params_buffer, sizeof (params_buffer)); -+ -+ params[0] = spa_pod_builder_object ( -+ &pod_builder, -+ pipewire_type->param.idBuffers, pipewire_type->param_buffers.Buffers, -+ ":", pipewire_type->param_buffers.size, "i", size, -+ ":", pipewire_type->param_buffers.stride, "i", stride, -+ ":", pipewire_type->param_buffers.buffers, "iru", 16, PROP_RANGE (2, 16), -+ ":", pipewire_type->param_buffers.align, "i", 16); -+ -+ pw_stream_finish_format (priv->pipewire_stream, 0, - params, G_N_ELEMENTS (params)); - } - -@@ -336,16 +316,17 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src, - MetaScreenCastStreamSrcPrivate *priv = - meta_screen_cast_stream_src_get_instance_private (src); - struct pw_stream *pipewire_stream; -- const struct spa_format *format; - uint8_t buffer[1024]; - struct spa_pod_builder pod_builder = - SPA_POD_BUILDER_INIT (buffer, sizeof (buffer)); -- struct spa_pod_frame format_frame; -- struct spa_pod_frame prop_frame; - MetaSpaType *spa_type = &priv->spa_type; -+ struct pw_type *pipewire_type = priv->pipewire_type; - int width, height; - float frame_rate; - MetaFraction frame_rate_fraction; -+ struct spa_fraction max_framerate; -+ struct spa_fraction min_framerate; -+ const struct spa_pod *params[1]; - - pipewire_stream = pw_stream_new (priv->pipewire_remote, - "meta-screen-cast-src", -@@ -354,42 +335,32 @@ create_pipewire_stream (MetaScreenCastStreamSrc *src, - meta_screen_cast_stream_src_get_specs (src, &width, &height, &frame_rate); - frame_rate_fraction = meta_fraction_from_double (frame_rate); - -- spa_pod_builder_format (&pod_builder, &format_frame, -- spa_type->format, -- spa_type->media_type.video, -- spa_type->media_subtype.raw, -- PROP (&prop_frame, -- spa_type->format_video.format, -- SPA_POD_TYPE_ID, spa_type->video_format.BGRx), -- PROP (&prop_frame, -- spa_type->format_video.size, -- SPA_POD_TYPE_RECTANGLE, -- width, height), -- PROP (&prop_frame, -- spa_type->format_video.framerate, -- SPA_POD_TYPE_FRACTION, -- 0, 1), -- PROP_U_MM (&prop_frame, -- spa_type->format_video.max_framerate, -- SPA_POD_TYPE_FRACTION, -- frame_rate_fraction.num, -- frame_rate_fraction.denom, -- 1, 1, -- frame_rate_fraction.num, -- frame_rate_fraction.denom)); -- format = SPA_POD_BUILDER_DEREF (&pod_builder, format_frame.ref, struct spa_format); -+ min_framerate = SPA_FRACTION (1, 1); -+ max_framerate = SPA_FRACTION (frame_rate_fraction.num, -+ frame_rate_fraction.denom); -+ -+ params[0] = spa_pod_builder_object ( -+ &pod_builder, -+ pipewire_type->param.idEnumFormat, pipewire_type->spa_format, -+ "I", spa_type->media_type.video, -+ "I", spa_type->media_subtype.raw, -+ ":", spa_type->format_video.format, "I", spa_type->video_format.BGRx, -+ ":", spa_type->format_video.size, "R", &SPA_RECTANGLE (width, height), -+ ":", spa_type->format_video.framerate, "F", &SPA_FRACTION (0, 1), -+ ":", spa_type->format_video.max_framerate, "Fr", &max_framerate, -+ PROP_RANGE (&min_framerate, -+ &max_framerate)); - - pw_stream_add_listener (pipewire_stream, - &priv->pipewire_stream_listener, - &stream_events, - src); - -- if (!pw_stream_connect (pipewire_stream, -- PW_DIRECTION_OUTPUT, -- PW_STREAM_MODE_BUFFER, -- NULL, -- PW_STREAM_FLAG_NONE, -- 1, &format)) -+ if (pw_stream_connect (pipewire_stream, -+ PW_DIRECTION_OUTPUT, -+ NULL, -+ PW_STREAM_FLAG_NONE, -+ params, G_N_ELEMENTS (¶ms)) != 0) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - "Could not connect"); -@@ -453,10 +424,8 @@ pipewire_loop_source_dispatch (GSource *source, - int result; - - result = pw_loop_iterate (pipewire_source->pipewire_loop, 0); -- if (result == SPA_RESULT_ERRNO) -- g_warning ("pipewire_loop_iterate failed: %s", strerror (errno)); -- else if (result != SPA_RESULT_OK) -- g_warning ("pipewire_loop_iterate failed: %d", result); -+ if (result < 0) -+ g_warning ("pipewire_loop_iterate failed: %s", spa_strerror (result)); - - return TRUE; - } -@@ -482,10 +451,6 @@ static void - init_spa_type (MetaSpaType *type, - struct spa_type_map *map) - { -- type->format = spa_type_map_get_id (map, SPA_TYPE__Format); -- type->props = spa_type_map_get_id (map, SPA_TYPE__Props); -- spa_type_meta_map (map, &type->meta); -- spa_type_data_map (map, &type->data); - spa_type_media_type_map (map, &type->media_type); - spa_type_media_subtype_map (map, &type->media_subtype); - spa_type_format_video_map (map, &type->format_video); -@@ -535,13 +500,7 @@ meta_screen_cast_stream_src_initable_init (GInitable *initable, - return FALSE; - } - --#if PIPEWIRE_VERSION_MICRO == 4 -- priv->pipewire_remote = pw_remote_new (priv->pipewire_core, NULL); --#elif PIPEWIRE_VERSION_MICRO >= 5 - priv->pipewire_remote = pw_remote_new (priv->pipewire_core, NULL, 0); --#else -- priv->pipewire_remote = NULL; --#endif - if (!priv->pipewire_remote) - { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, diff --git a/sources b/sources index b79890b..1686e76 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mutter-3.27.1.tar.xz) = ba7c00bd52c829e745248799b221abc586a674448e29bdfa11865811207b73d21ed38781caa5e27eaa7b611df76e24164e35e5aeec24bd28e4765377d6f69e45 +SHA512 (mutter-3.27.91.tar.xz) = d3735e21ca0ae595c46d430c9a569a49eac853e2524b0a05ff6a8f0e0da4d6213b914718652c53f81f31704d47b0b6a017177ba1964462bdfab459c0521f287e