Hi,

Before filing a bug, I thought I'd fly this by others on the list to see
if either I'm doing something wrong, or nobody but me is seeing this
issue.

I'm applying a simple behaviour to a ClutterGLXTexturePixmap and I'm
seeing many skipped frames in the timeline.  However, the redirected
window is a video, and no frames seem to be dropped on the video itself,
it's just the animation that is choppy.  This suggests to me it's not a
bottleneck in the GPU (nvidia 7100GS).

Usually it skips not more than 10 frames, but sometimes I've seen it
skip dozens, and occasionally well over over 100 frames (while the
behaviour literally stops for a long period of time, meanwhile the
pixmap continues to update).  When I set
clutter_x11_texture_pixmap_set_automatic to FALSE, it's quite smooth,
perhaps unsurprisingly.  Happens also with ClutterX11TexturePixmap.

For example:

[EMAIL PROTECTED]:~$ ./clutter-tfp-behaviour-test 0x800001 
--clutter-debug=scheduler 2>&1 | grep skipping
Clutter-Message: [SCHEDULER] 176495:clutter-timeline.c:622: Timeline 
[0x8050458], skipping 1 frames
Clutter-Message: [SCHEDULER] 245034:clutter-timeline.c:622: Timeline 
[0x8050458], skipping 2 frames
Clutter-Message: [SCHEDULER] 330042:clutter-timeline.c:622: Timeline 
[0x8050458], skipping 2 frames
Clutter-Message: [SCHEDULER] 411773:clutter-timeline.c:622: Timeline 
[0x8050458], skipping 2 frames
Clutter-Message: [SCHEDULER] 479650:clutter-timeline.c:622: Timeline 
[0x8050458], skipping 3 frames
[...]

There are over 150 such lines for a 10s animation.

I've attached a test.  Can anyone reproduce this?

Cheers,
Jason.
// gcc clutter-tfp-behaviour-test.c `pkg-config clutter-0.7 --cflags --libs` -lXcomposite -o clutter-tfp-behaviour-test

#include <stdlib.h>

#include <clutter/clutter.h>
#include <clutter/glx/clutter-glx.h>

int
main (int argc, char **argv)
{
    ClutterActor *stage, *tex;
    Window win_remote;

    clutter_init (&argc, &argv);

    if (argc < 2)
      g_error ("usage: %s <window id>", argv[0]);

    win_remote = strtol(argv[1], NULL, 0);

    stage = clutter_stage_get_default ();
    clutter_actor_set_size(stage, 640, 480);

    tex = clutter_x11_texture_pixmap_new_with_window (win_remote);
    g_object_set(tex, "window-redirect-automatic", FALSE, NULL);
    clutter_container_add_actor(CLUTTER_CONTAINER (stage), tex);

    clutter_x11_texture_pixmap_set_automatic(CLUTTER_X11_TEXTURE_PIXMAP (tex), TRUE);
    clutter_actor_set_rotation(tex, CLUTTER_Y_AXIS, 45, 0, 0, 0);

    ClutterTimeline *timeline = clutter_timeline_new_for_duration(10000);
    ClutterAlpha *alpha = clutter_alpha_new_full(timeline, CLUTTER_ALPHA_RAMP_INC, NULL, NULL);
    ClutterBehaviour *behave =  clutter_behaviour_rotate_new(alpha, CLUTTER_Y_AXIS, CLUTTER_ROTATE_CCW, 45, 0);
    clutter_behaviour_apply(behave, tex);
    clutter_timeline_start(timeline);

    clutter_actor_show_all(stage);
    clutter_main ();

    return EXIT_SUCCESS;
}

Reply via email to