Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=98c61ae779216c19bde14183d77cc4e70df9d90e
commit 98c61ae779216c19bde14183d77cc4e70df9d90e Author: Baste <[email protected]> Date: Mon Nov 3 16:38:34 2014 +0100 mutter-3.14.1.5-1-x86_64 - 3.14.0 -> 3.14.1.5 diff --git a/source/gnome/mutter/FrugalBuild b/source/gnome/mutter/FrugalBuild index 0920014..4e1ba90 100644 --- a/source/gnome/mutter/FrugalBuild +++ b/source/gnome/mutter/FrugalBuild @@ -5,8 +5,8 @@ options+=('asneeded') pkgname=mutter -pkgver=3.14.0 -pkgrel=3 +pkgver=3.14.1.5 +pkgrel=1 pkgdesc="A window manager for GNOME (new metacity for gnome3)" url="http://www.gnome.org/" depends=('libxml2>=2.7.8' 'clutter>=1.20.0' 'startup-notification' \ @@ -21,7 +21,9 @@ _F_gnome_devel="n" _F_gnome_ext=".tar.xz" Finclude gnome gnome-scriptlet Fconfopts+=" --with-clutter --disable-static --with-gtk=3.0 --enable-compile-warnings=minimum" -sha1sums=('acf1968eee1b969725c1b430f2b909a26f8b3c5a') +source=($source mutter.patch) +sha1sums=('9864f76044af4ae37f1aba2dc6049e75b398b8ac' \ + '4bed78b2e9bffd14c771a8fa579b80fe570fb650') if [ "$_F_gnome_git" != "n" ]; then unset sha1sums @@ -36,7 +38,8 @@ build() { Fcd fi - #Fsed "-Werror" "" configure + Fsed "gbm >= 10.3" "gbm" configure.ac + Fautoreconf Fbuild Fbuild_gnome_scriptlet } diff --git a/source/gnome/mutter/mutter.patch b/source/gnome/mutter/mutter.patch new file mode 100644 index 0000000..0245c59 --- /dev/null +++ b/source/gnome/mutter/mutter.patch @@ -0,0 +1,164 @@ +--- src/backends/meta-cursor.c ++++ src/backends/meta-cursor-hack.c +@@ -140,68 +140,47 @@ + } + + static void +-get_hardware_cursor_size (uint64_t *cursor_width, uint64_t *cursor_height) ++meta_cursor_image_load_gbm_buffer (struct gbm_device *gbm, ++ MetaCursorImage *image, ++ uint8_t *pixels, ++ int width, ++ int height, ++ int rowstride, ++ uint32_t gbm_format) ++{ ++ if (width > 64 || height > 64) ++ { ++ meta_warning ("Invalid theme cursor size (must be at most 64x64)\n"); ++ return; ++ } ++ ++ if (gbm_device_is_format_supported (gbm, gbm_format, ++ GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE)) ++ { ++ uint8_t buf[4 * 64 * 64]; ++ int i; ++ ++ image->bo = gbm_bo_create (gbm, 64, 64, ++ gbm_format, GBM_BO_USE_CURSOR_64X64 | GBM_BO_USE_WRITE); ++ ++ memset (buf, 0, sizeof(buf)); ++ for (i = 0; i < height; i++) ++ memcpy (buf + i * 4 * 64, pixels + i * rowstride, width * 4); ++ ++ gbm_bo_write (image->bo, buf, 64 * 64 * 4); ++ } ++ else ++ meta_warning ("HW cursor for format %d not supported\n", gbm_format); ++} ++ ++static struct gbm_device * ++get_gbm_device (void) + { + #ifdef HAVE_NATIVE_BACKEND + MetaBackend *meta_backend = meta_get_backend (); + MetaCursorRenderer *renderer = meta_backend_get_cursor_renderer (meta_backend); + + if (META_IS_CURSOR_RENDERER_NATIVE (renderer)) +- { +- meta_cursor_renderer_native_get_cursor_size (META_CURSOR_RENDERER_NATIVE (renderer), cursor_width, cursor_height); +- return; +- } +-#endif +- +- g_assert_not_reached (); +-} +- +-static void +-meta_cursor_image_load_gbm_buffer (struct gbm_device *gbm, +- MetaCursorImage *image, +- uint8_t *pixels, +- uint width, +- uint height, +- int rowstride, +- uint32_t gbm_format) +-{ +- uint64_t cursor_width, cursor_height; +- get_hardware_cursor_size (&cursor_width, &cursor_height); +- +- if (width > cursor_width || height > cursor_height) +- { +- meta_warning ("Invalid theme cursor size (must be at most %ux%u)\n", +- (unsigned int)cursor_width, (unsigned int)cursor_height); +- return; +- } +- +- if (gbm_device_is_format_supported (gbm, gbm_format, +- GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE)) +- { +- uint8_t buf[4 * cursor_width * cursor_height]; +- uint i; +- +- image->bo = gbm_bo_create (gbm, cursor_width, cursor_height, +- gbm_format, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE); +- +- memset (buf, 0, sizeof(buf)); +- for (i = 0; i < height; i++) +- memcpy (buf + i * 4 * cursor_width, pixels + i * rowstride, width * 4); +- +- gbm_bo_write (image->bo, buf, cursor_width * cursor_height * 4); +- } +- else +- meta_warning ("HW cursor for format %d not supported\n", gbm_format); +-} +- +-static struct gbm_device * +-get_gbm_device (void) +-{ +-#ifdef HAVE_NATIVE_BACKEND +- MetaBackend *meta_backend = meta_get_backend (); +- MetaCursorRenderer *renderer = meta_backend_get_cursor_renderer (meta_backend); +- +- if (META_IS_CURSOR_RENDERER_NATIVE (renderer)) + return meta_cursor_renderer_native_get_gbm_device (META_CURSOR_RENDERER_NATIVE (renderer)); + #endif + +@@ -212,7 +191,7 @@ + meta_cursor_image_load_from_xcursor_image (MetaCursorImage *image, + XcursorImage *xc_image) + { +- uint width, height, rowstride; ++ int width, height, rowstride; + CoglPixelFormat cogl_format; + uint32_t gbm_format; + ClutterBackend *clutter_backend; +@@ -283,8 +262,7 @@ + CoglContext *cogl_context; + struct wl_shm_buffer *shm_buffer; + uint32_t gbm_format; +- uint64_t cursor_width, cursor_height; +- uint width, height; ++ int width, height; + + image->hot_x = hot_x; + image->hot_y = hot_y; +@@ -335,23 +313,22 @@ + } + else + { ++ /* HW cursors must be 64x64, but 64x64 is huge, and no cursor theme actually uses ++ that, so themed cursors must be padded with transparent pixels to fill the ++ overlay. This is trivial if we have CPU access to the data, but it's not ++ possible if the buffer is in GPU memory (and possibly tiled too), so if we ++ don't get the right size, we fallback to GL. ++ */ ++ if (width != 64 || height != 64) ++ { ++ meta_warning ("Invalid cursor size (must be 64x64), falling back to software (GL) cursors\n"); ++ return; ++ } ++ + if (gbm) + { +- /* HW cursors have a predefined size (at least 64x64), which usually is bigger than cursor theme +- size, so themed cursors must be padded with transparent pixels to fill the +- overlay. This is trivial if we have CPU access to the data, but it's not +- possible if the buffer is in GPU memory (and possibly tiled too), so if we +- don't get the right size, we fallback to GL. +- */ +- get_hardware_cursor_size (&cursor_width, &cursor_height); +- +- if (width != cursor_width || height != cursor_height) +- { +- meta_warning ("Invalid cursor size (must be 64x64), falling back to software (GL) cursors\n"); +- return; +- } +- +- image->bo = gbm_bo_import (gbm, GBM_BO_IMPORT_WL_BUFFER, buffer, GBM_BO_USE_CURSOR); ++ image->bo = gbm_bo_import (gbm, GBM_BO_IMPORT_WL_BUFFER, ++ buffer, GBM_BO_USE_CURSOR_64X64); + if (!image->bo) + meta_warning ("Importing HW cursor from wl_buffer failed\n"); + } + _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
