actor: consider empty pv ok in set_default_paint_volume

In _clutter_actor_set_default_paint_volume we were returning FALSE if an
actor has an empty allocation because we were claiming it doesn't have a
paint-volume. Actually an empty/degenerate pv is valid and has different
semantics to returning FALSE because FALSE means the pv is unknown and
so Clutter will have to assume the worst - that the pv is basically
un-bounded.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-09-19 14:38:08 +01:00
parent 239fc43c5f
commit 96866804f0

View File

@ -967,10 +967,6 @@ _clutter_actor_set_default_paint_volume (ClutterActor *self,
clutter_actor_get_allocation_box (self, &box); clutter_actor_get_allocation_box (self, &box);
/* a zero-sized actor has no paint volume */
if (box.x1 == box.x2 || box.y1 == box.y2)
return FALSE;
clutter_paint_volume_set_width (volume, box.x2 - box.x1); clutter_paint_volume_set_width (volume, box.x2 - box.x1);
clutter_paint_volume_set_height (volume, box.y2 - box.y1); clutter_paint_volume_set_height (volume, box.y2 - box.y1);