r37816 - in /desktop/experimental/clutter-1.0/debian: changelog patches/git_cally_weak_pointer.patch patches/git_fbo_size_check.patch patches/git_limit_offscreen_fbo_size.patch patches/series
ricotz-guest at users.alioth.debian.org
ricotz-guest at users.alioth.debian.org
Wed May 22 10:16:56 UTC 2013
Author: ricotz-guest
Date: Wed May 22 10:16:55 2013
New Revision: 37816
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=37816
Log:
Cherry pick latest commits from upstream 1.14 branch
Added:
desktop/experimental/clutter-1.0/debian/patches/git_cally_weak_pointer.patch
desktop/experimental/clutter-1.0/debian/patches/git_fbo_size_check.patch
desktop/experimental/clutter-1.0/debian/patches/git_limit_offscreen_fbo_size.patch
Modified:
desktop/experimental/clutter-1.0/debian/changelog
desktop/experimental/clutter-1.0/debian/patches/series
Modified: desktop/experimental/clutter-1.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/clutter-1.0/debian/changelog?rev=37816&op=diff
==============================================================================
--- desktop/experimental/clutter-1.0/debian/changelog [utf-8] (original)
+++ desktop/experimental/clutter-1.0/debian/changelog [utf-8] Wed May 22 10:16:55 2013
@@ -3,6 +3,12 @@
* New upstream release
+ debian/libclutter-1.0-0.symbols:
- Updated.
+ * debian/patches/git_limit_offscreen_fbo_size.patch:
+ - offscreen-effect: limit offscreen fbo size to the stage's size
+ * debian/patches/git_fbo_size_check.patch:
+ - conform: add offscreen effects fbo size check
+ * debian/patches/git_cally_weak_pointer.patch:
+ - cally: Use a weak pointer to hold the key focus in CallyStage
-- Rico Tzschichholz <ricotz at ubuntu.com> Wed, 22 May 2013 11:59:53 +0200
Added: desktop/experimental/clutter-1.0/debian/patches/git_cally_weak_pointer.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/clutter-1.0/debian/patches/git_cally_weak_pointer.patch?rev=37816&op=file
==============================================================================
--- desktop/experimental/clutter-1.0/debian/patches/git_cally_weak_pointer.patch (added)
+++ desktop/experimental/clutter-1.0/debian/patches/git_cally_weak_pointer.patch [utf-8] Wed May 22 10:16:55 2013
@@ -1,0 +1,53 @@
+From a586c23ddcef9a11f6e343b4b6848cde2df54927 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi at gnome.org>
+Date: Mon, 06 May 2013 22:46:25 +0000
+Subject: cally: Use a weak pointer to hold the key focus in CallyStage
+
+We want to avoid the pointer getting stale, and causing crashes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=692706
+(cherry picked from commit 19391a9626b087bd4df452e8699d53caa54c350f)
+
+Signed-off-by: Emmanuele Bassi <ebassi at gnome.org>
+---
+diff --git a/clutter/cally/cally-stage.c b/clutter/cally/cally-stage.c
+index 2b1cfd1..c95ccb0 100644
+--- a/clutter/cally/cally-stage.c
++++ b/clutter/cally/cally-stage.c
+@@ -139,7 +139,11 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage,
+ AtkObject *old = NULL;
+
+ if (self->priv->key_focus != NULL)
+- old = clutter_actor_get_accessible (self->priv->key_focus);
++ {
++ g_object_remove_weak_pointer (G_OBJECT (self->priv->key_focus),
++ (gpointer *) &self->priv->key_focus);
++ old = clutter_actor_get_accessible (self->priv->key_focus);
++ }
+ else
+ old = clutter_actor_get_accessible (CLUTTER_ACTOR (stage));
+
+@@ -154,7 +158,19 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage,
+ self->priv->key_focus = key_focus;
+
+ if (key_focus != NULL)
+- new = clutter_actor_get_accessible (key_focus);
++ {
++ /* ensure that if the key focus goes away, the field inside
++ * CallyStage is reset. see bug:
++ *
++ * https://bugzilla.gnome.org/show_bug.cgi?id=692706
++ *
++ * we remove the weak pointer above.
++ */
++ g_object_add_weak_pointer (G_OBJECT (self->priv->key_focus),
++ (gpointer *) &self->priv->key_focus);
++
++ new = clutter_actor_get_accessible (key_focus);
++ }
+ else
+ new = clutter_actor_get_accessible (CLUTTER_ACTOR (stage));
+
+--
+cgit v0.9.1
+
Added: desktop/experimental/clutter-1.0/debian/patches/git_fbo_size_check.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/clutter-1.0/debian/patches/git_fbo_size_check.patch?rev=37816&op=file
==============================================================================
--- desktop/experimental/clutter-1.0/debian/patches/git_fbo_size_check.patch (added)
+++ desktop/experimental/clutter-1.0/debian/patches/git_fbo_size_check.patch [utf-8] Wed May 22 10:16:55 2013
@@ -1,0 +1,159 @@
+From 05cf212088b1224b195381942075df7d7b5f9c97 Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <llandwerlin at gmail.com>
+Date: Wed, 15 May 2013 13:23:53 +0000
+Subject: conform: add offscreen effects fbo size check
+
+https://bugzilla.gnome.org/show_bug.cgi?id=699675
+(cherry picked from commit d1041e1f4f5bedc6331e65a7faf60289f26f7fb0)
+
+Signed-off-by: Emmanuele Bassi <ebassi at gnome.org>
+---
+diff --git a/tests/conform/Makefile.am b/tests/conform/Makefile.am
+index 210cbe0..22dcdfc 100644
+--- a/tests/conform/Makefile.am
++++ b/tests/conform/Makefile.am
+@@ -55,6 +55,7 @@ units_sources += \
+ actor-iter.c \
+ actor-layout.c \
+ actor-offscreen-redirect.c \
++ actor-offscreen-limit-max-size.c\
+ actor-paint-opacity.c \
+ actor-pick.c \
+ actor-shader-effect.c \
+diff --git a/tests/conform/actor-offscreen-limit-max-size.c b/tests/conform/actor-offscreen-limit-max-size.c
+new file mode 100644
+index 0000000..9729866
+--- /dev/null
++++ b/tests/conform/actor-offscreen-limit-max-size.c
+@@ -0,0 +1,117 @@
++#include <clutter/clutter.h>
++
++#include "test-conform-common.h"
++
++#define STAGE_WIDTH (300)
++#define STAGE_HEIGHT (300)
++
++typedef struct
++{
++ ClutterActor *stage;
++
++ ClutterActor *actor_group1;
++ ClutterEffect *blur_effect1;
++
++ ClutterActor *actor_group2;
++ ClutterEffect *blur_effect2;
++} Data;
++
++static void
++check_results (ClutterStage *stage, gpointer user_data)
++{
++ Data *data = user_data;
++ gfloat width, height;
++
++ clutter_offscreen_effect_get_target_size (CLUTTER_OFFSCREEN_EFFECT (data->blur_effect1),
++ &width, &height);
++
++ if (g_test_verbose ())
++ g_print ("Checking effect1 size: %.2f x %.2f\n", width, height);
++
++ g_assert_cmpint (width, <, STAGE_WIDTH);
++ g_assert_cmpint (height, <, STAGE_HEIGHT);
++
++ clutter_offscreen_effect_get_target_size (CLUTTER_OFFSCREEN_EFFECT (data->blur_effect2),
++ &width, &height);
++
++ if (g_test_verbose ())
++ g_print ("Checking effect2 size: %.2f x %.2f\n", width, height);
++
++ g_assert_cmpint (width, ==, STAGE_WIDTH);
++ g_assert_cmpint (height, ==, STAGE_HEIGHT);
++
++
++ clutter_main_quit ();
++}
++
++static ClutterActor *
++create_actor (gfloat x, gfloat y,
++ gfloat width, gfloat height,
++ const ClutterColor *color)
++{
++ return g_object_new (CLUTTER_TYPE_ACTOR,
++ "x", x,
++ "y", y,
++ "width", width,
++ "height", height,
++ "background-color", color,
++ NULL);
++}
++
++void
++actor_offscreen_limit_max_size (TestConformSimpleFixture *fixture,
++ gconstpointer test_data)
++{
++ if (cogl_features_available (COGL_FEATURE_OFFSCREEN))
++ {
++ Data data;
++
++ data.stage = clutter_stage_new ();
++ clutter_stage_set_paint_callback (CLUTTER_STAGE (data.stage),
++ check_results,
++ &data,
++ NULL);
++ clutter_actor_set_size (data.stage, STAGE_WIDTH, STAGE_HEIGHT);
++
++ data.actor_group1 = clutter_actor_new ();
++ clutter_actor_add_child (data.stage, data.actor_group1);
++ data.blur_effect1 = clutter_blur_effect_new ();
++ clutter_actor_add_effect (data.actor_group1, data.blur_effect1);
++ clutter_actor_add_child (data.actor_group1,
++ create_actor (10, 10,
++ 100, 100,
++ CLUTTER_COLOR_Blue));
++ clutter_actor_add_child (data.actor_group1,
++ create_actor (100, 100,
++ 100, 100,
++ CLUTTER_COLOR_Gray));
++
++ data.actor_group2 = clutter_actor_new ();
++ clutter_actor_add_child (data.stage, data.actor_group2);
++ data.blur_effect2 = clutter_blur_effect_new ();
++ clutter_actor_add_effect (data.actor_group2, data.blur_effect2);
++ clutter_actor_add_child (data.actor_group2,
++ create_actor (-10, -10,
++ 100, 100,
++ CLUTTER_COLOR_Yellow));
++ clutter_actor_add_child (data.actor_group2,
++ create_actor (250, 10,
++ 100, 100,
++ CLUTTER_COLOR_ScarletRed));
++ clutter_actor_add_child (data.actor_group2,
++ create_actor (10, 250,
++ 100, 100,
++ CLUTTER_COLOR_Yellow));
++
++ clutter_actor_show (data.stage);
++
++ clutter_main ();
++
++ clutter_actor_destroy (data.stage);
++
++ if (g_test_verbose ())
++ g_print ("OK\n");
++ }
++ else if (g_test_verbose ())
++ g_print ("Skipping\n");
++}
+diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c
+index b623038..5a9b5b9 100644
+--- a/tests/conform/test-conform-main.c
++++ b/tests/conform/test-conform-main.c
+@@ -145,6 +145,7 @@ main (int argc, char **argv)
+ TEST_CONFORM_SIMPLE ("/actor", actor_basic_layout);
+ TEST_CONFORM_SIMPLE ("/actor", actor_margin_layout);
+ TEST_CONFORM_SIMPLE ("/actor", actor_offscreen_redirect);
++ TEST_CONFORM_SIMPLE ("/actor", actor_offscreen_limit_max_size);
+ TEST_CONFORM_SIMPLE ("/actor", actor_shader_effect);
+
+ TEST_CONFORM_SIMPLE ("/actor/iter", actor_iter_traverse_children);
+--
+cgit v0.9.1
Added: desktop/experimental/clutter-1.0/debian/patches/git_limit_offscreen_fbo_size.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/clutter-1.0/debian/patches/git_limit_offscreen_fbo_size.patch?rev=37816&op=file
==============================================================================
--- desktop/experimental/clutter-1.0/debian/patches/git_limit_offscreen_fbo_size.patch (added)
+++ desktop/experimental/clutter-1.0/debian/patches/git_limit_offscreen_fbo_size.patch [utf-8] Wed May 22 10:16:55 2013
@@ -1,0 +1,76 @@
+From 7f42f0e871494f460eef5bc92632ff720c3e3ea5 Mon Sep 17 00:00:00 2001
+From: Lionel Landwerlin <llandwerlin at gmail.com>
+Date: Sat, 04 May 2013 16:37:33 +0000
+Subject: offscreen-effect: limit offscreen fbo size to the stage's size
+
+When using a ClutterOffscreenEffect, the size of the offscreen buffer
+allocated to perform the effect is currently computed using the paint
+volume of the actor it's attached to and in the case the paint volume
+cannot be computed, the effect falls back to using the stage's size.
+
+If you scale an actor enough so its paint volume is much bigger that
+the size of the stage, you can end up running out of memory (which
+leads to your application crashing).
+
+https://bugzilla.gnome.org/show_bug.cgi?id=699675
+(cherry picked from commit 9c6f3793e832e03ec72c63cd11f28601bf760f5b)
+
+Signed-off-by: Emmanuele Bassi <ebassi at gnome.org>
+---
+diff --git a/clutter/clutter-offscreen-effect.c b/clutter/clutter-offscreen-effect.c
+index d58227f..b655b5d 100644
+--- a/clutter/clutter-offscreen-effect.c
++++ b/clutter/clutter-offscreen-effect.c
+@@ -223,9 +223,11 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
+ ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
+ ClutterOffscreenEffectPrivate *priv = self->priv;
+ ClutterActorBox box;
++ ClutterActor *stage;
+ CoglMatrix projection;
+ CoglColor transparent;
+- gfloat fbo_width, fbo_height;
++ gfloat stage_width, stage_height;
++ gfloat fbo_width = -1, fbo_height = -1;
+ gfloat width, height;
+ gfloat xexpand, yexpand;
+ int texture_width, texture_height;
+@@ -236,6 +238,9 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
+ if (priv->actor == NULL)
+ return FALSE;
+
++ stage = _clutter_actor_get_stage_internal (priv->actor);
++ clutter_actor_get_size (stage, &stage_width, &stage_height);
++
+ /* The paint box is the bounding box of the actor's paint volume in
+ * stage coordinates. This will give us the size for the framebuffer
+ * we need to redirect its rendering offscreen and its position will
+@@ -244,17 +249,21 @@ clutter_offscreen_effect_pre_paint (ClutterEffect *effect)
+ {
+ clutter_actor_box_get_size (&box, &fbo_width, &fbo_height);
+ clutter_actor_box_get_origin (&box, &priv->x_offset, &priv->y_offset);
++
++ fbo_width = MIN (fbo_width, stage_width);
++ fbo_height = MIN (fbo_height, stage_height);
+ }
+ else
+ {
+- /* If we can't get a valid paint box then we fallback to
+- * creating a full stage size fbo. */
+- ClutterActor *stage = _clutter_actor_get_stage_internal (priv->actor);
+- clutter_actor_get_size (stage, &fbo_width, &fbo_height);
+- priv->x_offset = 0.0f;
+- priv->y_offset = 0.0f;
++ fbo_width = stage_width;
++ fbo_height = stage_height;
+ }
+
++ if (fbo_width == stage_width)
++ priv->x_offset = 0.0f;
++ if (fbo_height == stage_height)
++ priv->y_offset = 0.0f;
++
+ /* First assert that the framebuffer is the right size... */
+ if (!update_fbo (effect, fbo_width, fbo_height))
+ return FALSE;
+--
+cgit v0.9.1
Modified: desktop/experimental/clutter-1.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/clutter-1.0/debian/patches/series?rev=37816&op=diff
==============================================================================
--- desktop/experimental/clutter-1.0/debian/patches/series [utf-8] (original)
+++ desktop/experimental/clutter-1.0/debian/patches/series [utf-8] Wed May 22 10:16:55 2013
@@ -1,1 +1,4 @@
fix_test_data_path.patch
+git_limit_offscreen_fbo_size.patch
+git_fbo_size_check.patch
+git_cally_weak_pointer.patch
More information about the pkg-gnome-commits
mailing list