GNOME Bugzilla – Bug 695247
window clone redrawing stalls when window is not visible
Last modified: 2013-03-06 09:33:16 UTC
<drago01> huh <drago01> Jasper: can you test something? <Jasper> drago01, OK <drago01> Jasper: open gtk3-demo <drago01> Jasper: start the pixbuf test <drago01> Jasper: and go to the overview <drago01> Jasper: does it still animate smooth? <drago01> Jasper: here it drops lots of frames <Jasper> drago01, it seems to update when something else updates <drago01> yeah <Jasper> owen, ^ -- frame sync regression? <drago01> seems to affect videos too <drago01> owen: ? <Jasper> drago01, probably because we don't paint the meta-window-actor <drago01> Jasper: why wouldn't we paint it? <drago01> Jasper: it gets damage events so ... <Jasper> drago01, the thing in the overview is not a meta-window-actor <owen> dunno, maybe. I would think it wouldn't matter if the actor is visible or not as long as a clone is visible <Jasper> We clone the meta-shaped-texture to remove shadowx. <Jasper> We don't clone the meta-window-actor <drago01> seems to be related <drago01> the alt-tab thumbnail work <drago01> as long as the window is on the same workspace <drago01> window on a different workspace <drago01> -> same issue as in the overview <Jasper> Same thing there. We clone the stex. <drago01> yeah
Seems like the frame rate goes down to 1 FPS. So for some reason the damage events and/or the update_area calls are not causing the clone and thus the stage to redraw. It does not seem to have anything to do with frame synchronization as non synchronized apps (like mplayer and glxgears) are affected as well. Causing redraws by lets say dragging a window around in the overview (which maintains a high enough frame rate) causes the clones to update as expected.
I have added a print statement in meta_window_actor_process_damage and it seems like it gets called way less frequently when this happens (like once every couple of seconds) instead of having a continuous damage storm like you would expect from a 60 fps drawing app (which happens when you look at the real window rather then the clone). For the record tested with: diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index f54b87f..83c33f4 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1917,6 +1917,8 @@ meta_window_actor_process_damage (MetaWindowActor *self, priv->received_damage = TRUE; + g_print("damage<%ld>: %d, %d, %d, %d\n", g_get_monotonic_time (), event->area.x, event->area.y, event->area.width, event->area.height); + if (meta_window_is_fullscreen (priv->window) && g_list_last (info->windows)->data == self && !priv->unredirected) { MetaRectangle window_rect; (timestamp is needed to see how frequent the damage events come).
OK this with the damage events turned out to be wrong (added some more debugs to verify) the problem is that we do clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip); in meta_shaped_texture_update_area, which is a nop if the actor is not mapped. So we update our cogl texture (using cogl_texture_pixmap_x11_update_area) but we don't redraw the actor because the queue_redraw does not trigger a redraw.
<ebassi> drago01: check that you don't have Jasper patches applied from last night - the ones that bailed out from queue_redraw if the actor is not mapped -> Without this this works as expected.