diff --git a/0001-Update-ClutterWaylandSurface-to-use-a-resource-inste.patch b/0001-Update-ClutterWaylandSurface-to-use-a-resource-inste.patch new file mode 100644 index 0000000..b9ea70b --- /dev/null +++ b/0001-Update-ClutterWaylandSurface-to-use-a-resource-inste.patch @@ -0,0 +1,132 @@ +From 6c66148faf4b637c64d0e4fb1729422cf9808fa5 Mon Sep 17 00:00:00 2001 +From: Neil Roberts +Date: Thu, 4 Jul 2013 13:28:45 +0100 +Subject: [PATCH 1/2] Update ClutterWaylandSurface to use a resource instead of + wl_buffer + +The Wayland server API has changed so that wl_shm_buffer is no longer +a type of wl_buffer and wl_buffer will become an opaque type. This +changes ClutterWaylandSurface to accept resources for a wl_buffer +instead of directly taking the wl_buffer so that it can do different +things depending on whether the resource points to an SHM buffer or a +normal buffer. This matches similar changes to Cogl: + +https://git.gnome.org/browse/cogl/commit/?id=9b35e1651ad0e46ed48989 + +https://bugzilla.gnome.org/show_bug.cgi?id=703608 +--- + clutter/wayland/clutter-wayland-surface.c | 25 +++++++++++++++---------- + clutter/wayland/clutter-wayland-surface.h | 4 ++-- + 2 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/clutter/wayland/clutter-wayland-surface.c b/clutter/wayland/clutter-wayland-surface.c +index e16c3ff..9ee4035 100644 +--- a/clutter/wayland/clutter-wayland-surface.c ++++ b/clutter/wayland/clutter-wayland-surface.c +@@ -511,7 +511,7 @@ clutter_wayland_surface_new (struct wl_surface *surface) + /** + * clutter_wayland_surface_attach_buffer: + * @self: A #ClutterWaylandSurface actor +- * @buffer: A compositor side struct wl_buffer pointer ++ * @buffer: A compositor side resource representing a wl_buffer + * @error: A #GError + * + * This associates a client's buffer with the #ClutterWaylandSurface +@@ -523,7 +523,7 @@ clutter_wayland_surface_new (struct wl_surface *surface) + */ + gboolean + clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, +- struct wl_buffer *buffer, ++ struct wl_resource *buffer, + GError **error) + { + ClutterWaylandSurfacePrivate *priv; +@@ -536,8 +536,6 @@ clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, + + free_surface_buffers (self); + +- set_size (self, buffer->width, buffer->height); +- + priv->buffer = + cogl_wayland_texture_2d_new_from_buffer (context, buffer, error); + +@@ -551,13 +549,17 @@ clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, + if (!priv->buffer) + return FALSE; + ++ set_size (self, ++ cogl_texture_get_width (COGL_TEXTURE (priv->buffer)), ++ cogl_texture_get_height (COGL_TEXTURE (priv->buffer))); ++ + return TRUE; + } + + /** + * clutter_wayland_surface_damage_buffer: + * @self: A #ClutterWaylandSurface actor +- * @buffer: A compositor side struct wl_buffer pointer ++ * @buffer: A wayland resource for a buffer + * @x: The x coordinate of the damaged rectangle + * @y: The y coordinate of the damaged rectangle + * @width: The width of the damaged rectangle +@@ -575,23 +577,26 @@ clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, + */ + void + clutter_wayland_surface_damage_buffer (ClutterWaylandSurface *self, +- struct wl_buffer *buffer, ++ struct wl_resource *buffer, + gint32 x, + gint32 y, + gint32 width, + gint32 height) + { + ClutterWaylandSurfacePrivate *priv; ++ struct wl_shm_buffer *shm_buffer; + + g_return_if_fail (CLUTTER_WAYLAND_IS_SURFACE (self)); + + priv = self->priv; + +- if (priv->buffer && wl_buffer_is_shm (buffer)) ++ shm_buffer = wl_shm_buffer_get (buffer); ++ ++ if (priv->buffer && shm_buffer) + { + CoglPixelFormat format; + +- switch (wl_shm_buffer_get_format (buffer)) ++ switch (wl_shm_buffer_get_format (shm_buffer)) + { + #if G_BYTE_ORDER == G_BIG_ENDIAN + case WL_SHM_FORMAT_ARGB8888: +@@ -619,8 +624,8 @@ clutter_wayland_surface_damage_buffer (ClutterWaylandSurface *self, + width, height, + width, height, + format, +- wl_shm_buffer_get_stride (buffer), +- wl_shm_buffer_get_data (buffer)); ++ wl_shm_buffer_get_stride (shm_buffer), ++ wl_shm_buffer_get_data (shm_buffer)); + } + + g_signal_emit (self, signals[QUEUE_DAMAGE_REDRAW], +diff --git a/clutter/wayland/clutter-wayland-surface.h b/clutter/wayland/clutter-wayland-surface.h +index b68483e..da051e4 100644 +--- a/clutter/wayland/clutter-wayland-surface.h ++++ b/clutter/wayland/clutter-wayland-surface.h +@@ -95,10 +95,10 @@ void clutter_wayland_surface_set_surface (ClutterWaylandSurface * + struct wl_surface *surface); + struct wl_surface *clutter_wayland_surface_get_surface (ClutterWaylandSurface *self); + gboolean clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, +- struct wl_buffer *buffer, ++ struct wl_resource *buffer, + GError **error); + void clutter_wayland_surface_damage_buffer (ClutterWaylandSurface *self, +- struct wl_buffer *buffer, ++ struct wl_resource *buffer, + gint32 x, + gint32 y, + gint32 width, +-- +1.8.3.1 + diff --git a/0002-wayland-Don-t-pass-the-shell-and-compositor-down-to-.patch b/0002-wayland-Don-t-pass-the-shell-and-compositor-down-to-.patch new file mode 100644 index 0000000..4fa2a86 --- /dev/null +++ b/0002-wayland-Don-t-pass-the-shell-and-compositor-down-to-.patch @@ -0,0 +1,33 @@ +From 78f20627ac8f3387d0b4751d8bf66ce85676f8f4 Mon Sep 17 00:00:00 2001 +From: Neil Roberts +Date: Thu, 4 Jul 2013 13:32:14 +0100 +Subject: [PATCH 2/2] wayland: Don't pass the shell and compositor down to Cogl + +The Wayland 1.0 API allows orthoganal components of an application to +query the shell and compositor themselves by querying their own +wl_registry. The corresponding API in Cogl has been removed so Clutter +shouldn't call it anymore. + +https://bugzilla.gnome.org/show_bug.cgi?id=703878 +--- + clutter/wayland/clutter-backend-wayland.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/clutter/wayland/clutter-backend-wayland.c b/clutter/wayland/clutter-backend-wayland.c +index 610df50..bebfcd2 100644 +--- a/clutter/wayland/clutter-backend-wayland.c ++++ b/clutter/wayland/clutter-backend-wayland.c +@@ -244,10 +244,6 @@ clutter_backend_wayland_get_renderer (ClutterBackend *backend, + + cogl_wayland_renderer_set_foreign_display (renderer, + backend_wayland->wayland_display); +- cogl_wayland_renderer_set_foreign_compositor (renderer, +- backend_wayland->wayland_compositor); +- cogl_wayland_renderer_set_foreign_shell (renderer, +- backend_wayland->wayland_shell); + + return renderer; + } +-- +1.8.3.1 + diff --git a/clutter.spec b/clutter.spec index 6fa9e69..35a53b1 100644 --- a/clutter.spec +++ b/clutter.spec @@ -13,6 +13,8 @@ Group: Development/Libraries License: LGPLv2+ URL: http://www.clutter-project.org/ Source0: http://download.gnome.org/sources/clutter/1.15/clutter-%{version}.tar.xz +Patch1: 0001-Update-ClutterWaylandSurface-to-use-a-resource-inste.patch +Patch2: 0002-wayland-Don-t-pass-the-shell-and-compositor-down-to-.patch BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel @@ -76,6 +78,8 @@ This package contains documentation for clutter. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %build (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi; @@ -127,6 +131,7 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' * Fri Aug 09 2013 Kalev Lember - 1.15.2-1 - Update to 1.15.2 - Dropped upstream patches +- Backport patches for wayland / cogl 1.15.4 API changes * Sat Aug 03 2013 Fedora Release Engineering - 1.14.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild