MetaWindowActor: Skip paint optimization for actors with an effect

The optimizations might not work for an actor with an effect, and
our clipped drawing interferes badly with the operation of
CoglOffscreenEffect.

https://bugzilla.gnome.org/show_bug.cgi?id=659523
This commit is contained in:
Adel Gadllah 2011-09-20 16:55:48 +02:00
parent c1368155fc
commit 7c6bc73031

View File

@ -145,6 +145,25 @@ meta_window_group_paint (ClutterActor *actor)
if (!CLUTTER_ACTOR_IS_VISIBLE (l->data)) if (!CLUTTER_ACTOR_IS_VISIBLE (l->data))
continue; continue;
/* If an actor has effects applied, then that can change the area
* it paints and the opacity, so we no longer can figure out what
* portion of the actor is obscured and what portion of the screen
* it obscures, so we skip the actor.
*
* This has a secondary beneficial effect: if a ClutterOffscreenEffect
* is applied to an actor, then our clipped redraws interfere with the
* caching of the FBO - even if we only need to draw a small portion
* of the window right now, ClutterOffscreenEffect may use other portions
* of the FBO later. So, skipping actors with effects applied also
* prevents these bugs.
*
* Theoretically, we should check clutter_actor_get_offscreen_redirect()
* as well for the same reason, but omitted for simplicity in the
* hopes that no-one will do that.
*/
if (clutter_actor_get_effects (l->data) != NULL)
continue;
if (META_IS_WINDOW_ACTOR (l->data)) if (META_IS_WINDOW_ACTOR (l->data))
{ {
MetaWindowActor *window_actor = l->data; MetaWindowActor *window_actor = l->data;