summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2011-12-31 19:19:17 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2011-12-31 19:19:17 +0000
commitf7ebbd25fab1b5309462a98148f93ea4d8885223 (patch)
tree0ab69648bc55e5552b2dd61c0c7e64782ff9a1dd /media-libs/clutter/files
parentAdd Prefix keywords, bug #396547 (diff)
downloadgentoo-2-f7ebbd25fab1b5309462a98148f93ea4d8885223.tar.gz
gentoo-2-f7ebbd25fab1b5309462a98148f93ea4d8885223.tar.bz2
gentoo-2-f7ebbd25fab1b5309462a98148f93ea4d8885223.zip
Add useful patches from upstream; fixes totem on old video cards (thanks to Rafał Mużyło for reporting), font rendering, offscreen effect efficiency.
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/clutter/files')
-rw-r--r--media-libs/clutter/files/clutter-1.8.2-cogl-fallback-to-non-transparent.patch62
-rw-r--r--media-libs/clutter/files/clutter-1.8.2-default-resolution.patch56
-rw-r--r--media-libs/clutter/files/clutter-1.8.2-em-computation.patch38
-rw-r--r--media-libs/clutter/files/clutter-1.8.2-offscreen-effect-actor-size.patch78
4 files changed, 234 insertions, 0 deletions
diff --git a/media-libs/clutter/files/clutter-1.8.2-cogl-fallback-to-non-transparent.patch b/media-libs/clutter/files/clutter-1.8.2-cogl-fallback-to-non-transparent.patch
new file mode 100644
index 000000000000..cdf7c79a0ca4
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.8.2-cogl-fallback-to-non-transparent.patch
@@ -0,0 +1,62 @@
+From f05432d57e5e980d0841fd6c13a7f886a46107fe Mon Sep 17 00:00:00 2001
+From: Robert Bragg <robert@linux.intel.com>
+Date: Tue, 1 Nov 2011 13:42:40 +0000
+Subject: [PATCH] cogl: fallback to non-transparent stages if unsupported
+
+If our check of the CoglOnscreenTemplate during initialization fails
+then we disable the request for an alpha component in the swap chain and
+try the check again.
+
+Reviewed-by: Neil Roberts <neil@linux.intel.com>
+Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+ clutter/cogl/clutter-backend-cogl.c | 26 +++++++++++++++++++++++---
+ 1 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/clutter/cogl/clutter-backend-cogl.c b/clutter/cogl/clutter-backend-cogl.c
+index 1ca8850..1343dd1 100644
+--- a/clutter/cogl/clutter-backend-cogl.c
++++ b/clutter/cogl/clutter-backend-cogl.c
+@@ -296,6 +296,7 @@ clutter_backend_cogl_create_context (ClutterBackend *backend,
+ #endif
+ CoglSwapChain *swap_chain = NULL;
+ CoglOnscreenTemplate *onscreen_template = NULL;
++ gboolean status;
+
+ if (backend->cogl_context)
+ return TRUE;
+@@ -325,9 +326,28 @@ clutter_backend_cogl_create_context (ClutterBackend *backend,
+ * Conceptually should we be able to check an onscreen_template
+ * without more details about the CoglDisplay configuration?
+ */
+- if (!cogl_renderer_check_onscreen_template (backend->cogl_renderer,
+- onscreen_template,
+- error))
++ status = cogl_renderer_check_onscreen_template (backend->cogl_renderer,
++ onscreen_template,
++ error);
++#ifdef COGL_HAS_XLIB_SUPPORT
++ if (!status && clutter_x11_get_use_argb_visual ())
++ {
++ g_clear_error (error);
++ /* It's possible that the current renderer doesn't support transparency
++ * in a swap_chain so lets see if we can fallback to not having any
++ * transparency...
++ *
++ * XXX: It might be nice to have a CoglRenderer feature we could
++ * explicitly check for ahead of time.
++ */
++ cogl_swap_chain_set_has_alpha (swap_chain, FALSE);
++ status = cogl_renderer_check_onscreen_template (backend->cogl_renderer,
++ onscreen_template,
++ error);
++ }
++#endif
++
++ if (!status)
+ goto error;
+
+ backend->cogl_display = cogl_display_new (backend->cogl_renderer,
+--
+1.7.8.1
+
diff --git a/media-libs/clutter/files/clutter-1.8.2-default-resolution.patch b/media-libs/clutter/files/clutter-1.8.2-default-resolution.patch
new file mode 100644
index 000000000000..ddf65aac6a4c
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.8.2-default-resolution.patch
@@ -0,0 +1,56 @@
+From 0e6e3a5d4b51331df8df5bebd60195fbcf5caec5 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@linux.intel.com>
+Date: Mon, 5 Dec 2011 11:42:49 +0000
+Subject: [PATCH] backend: Return the correct default resolution
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If ClutterSettings:font-dpi is set to -1 then the default resolution
+should be returned by ClutterBackend — i.e. 96.0.
+(cherry picked from commit 943a65b476431400bd0436e1be243a2917385866)
+
+Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+ clutter/clutter-backend.c | 11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
+index 80e4853..8267544 100644
+--- a/clutter/clutter-backend.c
++++ b/clutter/clutter-backend.c
+@@ -179,14 +179,20 @@ clutter_backend_real_resolution_changed (ClutterBackend *backend)
+ ClutterBackendPrivate *priv = backend->priv;
+ ClutterMainContext *context;
+ ClutterSettings *settings;
++ gdouble resolution;
+ gint dpi;
+
+ settings = clutter_settings_get_default ();
+ g_object_get (settings, "font-dpi", &dpi, NULL);
+
++ if (dpi < 0)
++ resolution = 96.0;
++ else
++ resolution = dpi / 1024.0;
++
+ context = _clutter_context_get_default ();
+ if (context->font_map != NULL)
+- cogl_pango_font_map_set_resolution (context->font_map, dpi / 1024.0);
++ cogl_pango_font_map_set_resolution (context->font_map, resolution);
+
+ priv->units_per_em = get_units_per_em (backend, NULL);
+ priv->units_serial += 1;
+@@ -788,6 +794,9 @@ clutter_backend_get_resolution (ClutterBackend *backend)
+ settings = clutter_settings_get_default ();
+ g_object_get (settings, "font-dpi", &resolution, NULL);
+
++ if (resolution < 0)
++ return 96.0;
++
+ return resolution / 1024.0;
+ }
+
+--
+1.7.8.1
+
diff --git a/media-libs/clutter/files/clutter-1.8.2-em-computation.patch b/media-libs/clutter/files/clutter-1.8.2-em-computation.patch
new file mode 100644
index 000000000000..3b4d3f4f21b3
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.8.2-em-computation.patch
@@ -0,0 +1,38 @@
+From 85a466268360ad007de90e34b24fa0f56692eaa8 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@linux.intel.com>
+Date: Mon, 5 Dec 2011 11:43:48 +0000
+Subject: [PATCH] backend: Fix em computation for non-absolute fonts
+
+If a font description is not set to have an absolute size then we were
+using the wrong transformation for points to device units.
+(cherry picked from commit 158245fda31e7adad38aa49e4c12efcad0e326e0)
+
+Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
+---
+ clutter/clutter-backend.c | 8 ++------
+ 1 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
+index 8267544..db0a637 100644
+--- a/clutter/clutter-backend.c
++++ b/clutter/clutter-backend.c
+@@ -155,14 +155,10 @@ get_units_per_em (ClutterBackend *backend,
+ if (is_absolute)
+ font_size = (gdouble) pango_size / PANGO_SCALE;
+ else
+- font_size = (gdouble) pango_size / PANGO_SCALE
+- * dpi
+- / 96.0f;
++ font_size = dpi * ((gdouble) pango_size / PANGO_SCALE) / 72.0f;
+
+ /* 10 points at 96 DPI is 13.3 pixels */
+- units_per_em = (1.2f * font_size)
+- * dpi
+- / 96.0f;
++ units_per_em = (1.2f * font_size) * dpi / 96.0f;
+ }
+ else
+ units_per_em = -1.0f;
+--
+1.7.8.1
+
diff --git a/media-libs/clutter/files/clutter-1.8.2-offscreen-effect-actor-size.patch b/media-libs/clutter/files/clutter-1.8.2-offscreen-effect-actor-size.patch
new file mode 100644
index 000000000000..b5711af252ea
--- /dev/null
+++ b/media-libs/clutter/files/clutter-1.8.2-offscreen-effect-actor-size.patch
@@ -0,0 +1,78 @@
+From 2e5980612bb0f27c1616960a5b4bcd3898af14c0 Mon Sep 17 00:00:00 2001
+From: Neil Roberts <neil@linux.intel.com>
+Date: Mon, 28 Nov 2011 13:08:57 +0000
+Subject: [PATCH] offscreen-effect: Track the size of the actor separately
+
+Previously the offscreen effect was keeping track of the size of the
+texture so that it could detect when a different size is requested and
+create a new texture. However this breaks if a subclass overrides
+create_texture to make the texture bigger because in that case the
+size of the texture will always be different from the calculated size
+of the actor. This patch makes it also track the size of the fbo that
+was requested before being passed through create_texture() and it
+instead uses that to detect when a new FBO is needed.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=665040
+
+Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
+
+(cherry picked from commit a2774fb0dcce0c92036b69fb75092ec8dc80905d)
+---
+ clutter/clutter-offscreen-effect.c | 17 +++++++++++++++--
+ 1 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/clutter/clutter-offscreen-effect.c b/clutter/clutter-offscreen-effect.c
+index cf0d07c..071b415 100644
+--- a/clutter/clutter-offscreen-effect.c
++++ b/clutter/clutter-offscreen-effect.c
+@@ -85,9 +85,17 @@ struct _ClutterOffscreenEffectPrivate
+ gfloat x_offset;
+ gfloat y_offset;
+
++ /* The size of the texture */
+ gfloat target_width;
+ gfloat target_height;
+
++ /* This is the calculated size of the fbo before being passed
++ through create_texture(). This needs to be tracked separately so
++ that we can detect when a different size is calculated and
++ regenerate the fbo */
++ int fbo_width;
++ int fbo_height;
++
+ gint old_opacity_override;
+
+ /* The matrix that was current the last time the fbo was updated. We
+@@ -154,8 +162,8 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
+ return FALSE;
+ }
+
+- if (priv->target_width == fbo_width &&
+- priv->target_height == fbo_height &&
++ if (priv->fbo_width == fbo_width &&
++ priv->fbo_height == fbo_height &&
+ priv->offscreen != COGL_INVALID_HANDLE)
+ return TRUE;
+
+@@ -187,6 +195,9 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
+ priv->target_width = cogl_texture_get_width (texture);
+ priv->target_height = cogl_texture_get_height (texture);
+
++ priv->fbo_width = fbo_width;
++ priv->fbo_height = fbo_height;
++
+ if (priv->offscreen != COGL_INVALID_HANDLE)
+ cogl_handle_unref (priv->offscreen);
+
+@@ -200,6 +211,8 @@ update_fbo (ClutterEffect *effect, int fbo_width, int fbo_height)
+
+ priv->target_width = 0;
+ priv->target_height = 0;
++ priv->fbo_width = 0;
++ priv->fbo_height = 0;
+
+ return FALSE;
+ }
+--
+1.7.8.1
+