From d1c819b563209619d7e88d06e4825f94b80c0d12 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 7 Mar 2011 15:35:05 +0000 Subject: [PATCH] clutter-actor: Fix test for avoiding calculating the paint volume There's an optimisation in clutter-actor.c to avoid calculating the last known paint volume whenever culling and clipped redraws are both disabled. However there was a small thinko in the logic so that it would also avoid calculating the paint volume whenever only one of the debug flags is enabled. This fixes it to explicitly check that the two flags are not both enabled before skipping the paint volume calculation. --- clutter/clutter-actor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index fc0f3c391..dea3036a8 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -2694,10 +2694,11 @@ clutter_actor_paint (ClutterActor *self) */ if (!in_clone_paint ()) { - if (G_LIKELY (!(clutter_paint_debug_flags & - CLUTTER_DEBUG_DISABLE_CULLING) && - !(clutter_paint_debug_flags & - CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS))) + if (G_LIKELY ((clutter_paint_debug_flags & + (CLUTTER_DEBUG_DISABLE_CULLING | + CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS)) != + (CLUTTER_DEBUG_DISABLE_CULLING | + CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS))) _clutter_actor_update_last_paint_volume (self); if (cull_actor (self))