From c206ac47feb62b08a901daf006180e96fa0ff895 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 5 Feb 2014 20:01:46 +0100 Subject: [PATCH] Drop mutter-3.11.4-cogl-revert.patch ... as we now have recent enough cogl / clutter. --- mutter-3.11.4-cogl-revert.patch | 147 -------------------------------- mutter.spec | 10 --- 2 files changed, 157 deletions(-) delete mode 100644 mutter-3.11.4-cogl-revert.patch diff --git a/mutter-3.11.4-cogl-revert.patch b/mutter-3.11.4-cogl-revert.patch deleted file mode 100644 index 932fc8f..0000000 --- a/mutter-3.11.4-cogl-revert.patch +++ /dev/null @@ -1,147 +0,0 @@ -diff --git a/configure.ac b/configure.ac -index fe56026..f085550 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -76,7 +76,7 @@ MUTTER_PC_MODULES=" - gsettings-desktop-schemas >= 3.7.3 - xcomposite >= 0.2 xfixes xrender xdamage xi >= 1.6.0 - $CLUTTER_PACKAGE >= 1.15.90 -- cogl-1.0 >= 1.17.1 -+ cogl-1.0 >= 1.15.6 - upower-glib >= 0.99.0 - gnome-desktop-3.0 - " -diff --git a/src/compositor/meta-texture-rectangle.c b/src/compositor/meta-texture-rectangle.c -index cd585b5..3fc9430 100644 ---- a/src/compositor/meta-texture-rectangle.c -+++ b/src/compositor/meta-texture-rectangle.c -@@ -26,6 +26,41 @@ - #include - #include "meta-texture-rectangle.h" - -+CoglTexture * -+meta_texture_rectangle_new (unsigned int width, -+ unsigned int height, -+ CoglPixelFormat format, -+ CoglPixelFormat internal_format, -+ unsigned int rowstride, -+ const guint8 *data, -+ GError **error) -+{ -+ ClutterBackend *backend = -+ clutter_get_default_backend (); -+ CoglContext *context = -+ clutter_backend_get_cogl_context (backend); -+ CoglTextureRectangle *tex_rect; -+ -+ tex_rect = cogl_texture_rectangle_new_with_size (context, -+ width, height, -+ internal_format, -+ error); -+ if (tex_rect == NULL) -+ return NULL; -+ -+ if (data) -+ cogl_texture_set_region (COGL_TEXTURE (tex_rect), -+ 0, 0, /* src_x/y */ -+ 0, 0, /* dst_x/y */ -+ width, height, /* dst_width/height */ -+ width, height, /* width/height */ -+ format, -+ rowstride, -+ data); -+ -+ return COGL_TEXTURE (tex_rect); -+} -+ - static void - texture_rectangle_check_cb (CoglTexture *sub_texture, - const float *sub_texture_coords, -diff --git a/src/compositor/meta-texture-rectangle.h b/src/compositor/meta-texture-rectangle.h -index ba2624f..30f60d3 100644 ---- a/src/compositor/meta-texture-rectangle.h -+++ b/src/compositor/meta-texture-rectangle.h -@@ -28,6 +28,15 @@ - - G_BEGIN_DECLS - -+CoglTexture * -+meta_texture_rectangle_new (unsigned int width, -+ unsigned int height, -+ CoglPixelFormat format, -+ CoglPixelFormat internal_format, -+ unsigned int rowstride, -+ const guint8 *data, -+ GError **error); -+ - gboolean - meta_texture_rectangle_check (CoglTexture *texture); - -diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c -index 5d82add..9a30de0 100644 ---- a/src/compositor/meta-texture-tower.c -+++ b/src/compositor/meta-texture-tower.c -@@ -359,10 +359,18 @@ texture_tower_create_texture (MetaTextureTower *tower, - if ((!is_power_of_two (width) || !is_power_of_two (height)) && - meta_texture_rectangle_check (tower->textures[level - 1])) - { -- ClutterBackend *backend = clutter_get_default_backend (); -- CoglContext *context = clutter_backend_get_cogl_context (backend); -- -- tower->textures[level] = cogl_texture_rectangle_new_with_size (context, width, height); -+ tower->textures[level] = -+ meta_texture_rectangle_new (width, height, -+ /* data format */ -+ TEXTURE_FORMAT, -+ /* internal cogl format */ -+ TEXTURE_FORMAT, -+ /* rowstride */ -+ width * 4, -+ /* data */ -+ NULL, -+ /* error */ -+ NULL); - } - else - { -diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c -index b9473d2..a2c05ca 100644 ---- a/src/compositor/meta-window-actor.c -+++ b/src/compositor/meta-window-actor.c -@@ -2165,18 +2165,12 @@ build_and_scan_frame_mask (MetaWindowActor *self, - - if (meta_texture_rectangle_check (paint_tex)) - { -- ClutterBackend *backend = clutter_get_default_backend (); -- CoglContext *context = clutter_backend_get_cogl_context (backend); -- -- mask_texture = COGL_TEXTURE (cogl_texture_rectangle_new_with_size (context, tex_width, tex_height)); -- cogl_texture_set_components (mask_texture, COGL_TEXTURE_COMPONENTS_A); -- cogl_texture_set_region (mask_texture, -- 0, 0, /* src_x/y */ -- 0, 0, /* dst_x/y */ -- tex_width, tex_height, /* dst_width/height */ -- tex_width, tex_height, /* width/height */ -- COGL_PIXEL_FORMAT_A_8, -- stride, mask_data); -+ mask_texture = meta_texture_rectangle_new (tex_width, tex_height, -+ COGL_PIXEL_FORMAT_A_8, -+ COGL_PIXEL_FORMAT_A_8, -+ stride, -+ mask_data, -+ NULL /* error */); - } - else - { -diff --git a/src/core/meta-cursor-tracker.c b/src/core/meta-cursor-tracker.c -index 84f3185..d1b365e 100644 ---- a/src/core/meta-cursor-tracker.c -+++ b/src/core/meta-cursor-tracker.c -@@ -307,6 +307,7 @@ ensure_xfixes_cursor (MetaCursorTracker *tracker) - cursor_image->width, - cursor_image->height, - CLUTTER_CAIRO_FORMAT_ARGB32, -+ COGL_PIXEL_FORMAT_ANY, - cursor_image->width * 4, /* stride */ - cursor_data, - NULL); diff --git a/mutter.spec b/mutter.spec index 2621d11..95b4288 100644 --- a/mutter.spec +++ b/mutter.spec @@ -9,12 +9,6 @@ License: GPLv2+ URL: http://www.gnome.org Source0: http://download.gnome.org/sources/%{name}/3.11/%{name}-%{version}.tar.xz -# As cogl 1.17.1 does not exist yet, temporarily revert the commits that -# adjust to 1.17 API and require 1.17. This patch reverts upstream commits -# d2a1db8834 and 3548e6da73. Note this patch requires autogen.sh to be run: -# when dropping this patch, also drop the autoreconf call. -Patch0: mutter-3.11.4-cogl-revert.patch - BuildRequires: clutter-devel >= 1.13.5 BuildRequires: pango-devel BuildRequires: startup-notification-devel @@ -70,12 +64,8 @@ utilities for testing Metacity/Mutter themes. %prep %setup -q -%patch0 -p1 -b .cogl_revert %build -# only needed for patch0 (patches configure.ac), drop when dropping this patch -autoreconf -i - (if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi; %configure --disable-static --enable-compile-warnings=maximum)