From: Ray Strode Date: Wed, 29 Sep 2010 22:43:30 +0000 (-0400) Subject: actor: sync entry has_clip member to clip state X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=32d647ddd15ebddf91aa15b092fdcdf14d31ec4f;p=profile%2Fivi%2Fclutter.git actor: sync entry has_clip member to clip state The clutter stage has a list of entries of actors waiting to be redrawn. Each entry has a "clip" ClutterPaintVolume member which represents which how much of the actor needs to get redrawn. It's possible for there to be no clip associated with the entry. In this case, the clip member is invalid, the has_clip member should be set to false. This commit fixes a bug where the has_clip member was not being initially, explicitly set to false for new entries, and not being explicitly set to false in the event the clip associated with the entry is freed. http://bugzilla.clutter-project.org/show_bug.cgi?id=2350 Signed-off-by: Robert Bragg --- diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 1c4bb60..b50fab8 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -3212,6 +3212,8 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage, _clutter_paint_volume_init_static (actor, &entry->clip); _clutter_paint_volume_set_from_volume (&entry->clip, clip); } + else + entry->has_clip = FALSE; stage->priv->pending_queue_redraws = g_list_prepend (stage->priv->pending_queue_redraws, entry); @@ -3236,7 +3238,10 @@ _clutter_stage_queue_redraw_entry_invalidate ( g_object_unref (entry->actor); entry->actor = NULL; if (entry->has_clip) - clutter_paint_volume_free (&entry->clip); + { + clutter_paint_volume_free (&entry->clip); + entry->has_clip = FALSE; + } } static void