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.
This commit is contained in:
Neil Roberts 2011-03-07 15:35:05 +00:00
parent 9130dc1311
commit d1c819b563

View File

@ -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))