Re: Animation not working properly with the latest version
- From: Emmanuele Bassi <ebassi gmail com>
- To: Lionel Landwerlin <llandwerlin gmail com>
- Cc: "clutter-list gnome org" <clutter-list gnome org>
- Subject: Re: Animation not working properly with the latest version
- Date: Mon, 6 May 2013 10:12:43 -0700
hi;
I reworked the patch, and pushed it after Zeeshan tested it on both
Boxes and Maps, so the bug has been closed.
I also added the issue in the release notes for 1.16; basically:
implicit transitions will always be skipped on actors that are not
mapped (i.e. they are not visible or are children of not visible
parents), unless they are in a branch of the scene graph that is being
cloned. this was an implicit behaviour of Clutter, as ClutterActor
skipped paint and layout on those actors as well, so any implicit
transition would just be pointless busy work with no visible result.
on top of that, implicit transitions on allocation are ignored until
the actor has been allocated at least once; this is to avoid actors
"flying in" into their position and size on their first frame. this
should make UIs a bit more stable even in case of default, non-zero
easing durations.
I'm going to try and add more conditions on a per property/per
property class basis, to minimize the amount of work Clutter does, and
avoid unnecessary paint/layout cycles.
ciao,
Emmanuele.
On 6 May 2013 09:03, Lionel Landwerlin <llandwerlin gmail com> wrote:
You might want to have a look at this bug report :
https://bugzilla.gnome.org/show_bug.cgi?id=698766
On 04/05/13 10:43, Jiří Techet wrote:
Ah, In the above, substitute "mapped" with "painted" - it's of course
OK to skip the animation when the actor isn't mapped but the animation
shouldn't be skipped when it hasn't been painted yet which is the case
now.
Jiri
On Sat, May 4, 2013 at 11:37 AM, Jiří Techet <techet gmail com> wrote:
Hi,
I'm a maintainer of libchamplain and tried to build it with the latest
clutter version from jhbuild but after building it, libchamplain
doesn't work properly - basically no animations work and the code
which should be executed in animation completion handlers isn't
executed. I have bisected this issue to the following clutter commit:
8f032d595263a2f4fdb057ae5d954ee8236e96cf
actor: Skip transitions on invisible actors
It seems that the animation is completely skipped now if the actor
isn't mapped - which means it is not possible just to create an actor,
add it to the stage and run the animation because at that point the
actor isn't mapped. Minimal example (by modifying clutter's test) is
below:
#include <stdlib.h>
#include <gmodule.h>
#include <clutter/clutter.h>
static ClutterActor *stage;
static gboolean
animate (ClutterActor *actor)
{
clutter_actor_save_easing_state (actor);
clutter_actor_set_easing_duration (actor, 2000);
clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, 360.0);
clutter_actor_restore_easing_state (actor);
return FALSE;
}
G_MODULE_EXPORT int
test_animation_main (int argc, char *argv[])
{
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
stage = clutter_stage_new ();
clutter_actor_set_background_color (stage, clutter_color_get_static
(CLUTTER_COLOR_SKY_BLUE));
g_signal_connect (stage, "destroy", G_CALLBACK (clutter_main_quit), NULL);
ClutterActor *actor = clutter_actor_new ();
clutter_actor_set_background_color (actor, clutter_color_get_static
(CLUTTER_COLOR_ORANGE_LIGHT));
clutter_actor_add_child (stage, actor);
clutter_actor_set_size (actor, 100, 100);
clutter_actor_set_pivot_point (actor, .5f, .5f);
clutter_actor_set_translation (actor, -50, -50, 0);
clutter_actor_set_position (actor,
clutter_actor_get_width (stage) / 2,
clutter_actor_get_height (stage) / 2);
animate (actor);
// g_timeout_add (350, animate, actor);
clutter_actor_show (stage);
clutter_main ();
return EXIT_SUCCESS;
}
The above code won't trigger the animation. You can only get it
working if you comment-out the timeout function but I believe this is
not the intended behavior (if it is, it should only be done in 2.0
because this behavior is backward-incompatible and I bet it breaks a
lot of applications).
Jiri
_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list
_______________________________________________
clutter-list mailing list
clutter-list gnome org
https://mail.gnome.org/mailman/listinfo/clutter-list
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]