paint-volumes: remove is_axis_aligned assert for _union

This removes the pv->is_xis_aligned assertion in
_clutter_paint_volume_union. We were already considering the case where
the second volume may not be axis aligned and aligning it into a
temporary variable in that case, but we now also consider that the first
pv may also not be aligned.
This commit is contained in:
Robert Bragg 2011-06-16 15:22:03 +01:00
parent 4dc30c255f
commit e936b9591a

View File

@ -424,8 +424,10 @@ clutter_paint_volume_get_depth (const ClutterPaintVolume *pv)
* union
* @another_pv: A second #ClutterPaintVolume to union with @pv
*
* Updates the geometry of @pv to be the union bounding box that
* encompases @pv and @another_pv.
* Updates the geometry of @pv to encompass @pv and @another_pv.
*
* <note>There are no guarantees about how precisely the two volumes
* will be encompassed.</note>
*
* Since: 1.6
*/
@ -436,9 +438,11 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
ClutterPaintVolume aligned_pv;
g_return_if_fail (pv != NULL);
g_return_if_fail (pv->is_axis_aligned);
g_return_if_fail (another_pv != NULL);
/* Both volumes have to belong to the same local coordinate space */
g_return_if_fail (pv->actor == another_pv->actor);
/* NB: we only have to update vertices 0, 1, 3 and 4
* (See the ClutterPaintVolume typedef for more details) */
@ -455,6 +459,9 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
goto done;
}
if (!pv->is_axis_aligned)
_clutter_paint_volume_axis_align (pv);
if (!another_pv->is_axis_aligned)
{
_clutter_paint_volume_copy_static (another_pv, &aligned_pv);