paint-volumes: fix unioning with empty volumes
When calculating the union of a volume with an empty volume we aim to simply take the contents of the non-empty volume, but we were not copying the flags across. We now use _clutter_paint_volume_set_from_volume which copies all the flags except the is_static flag.
This commit is contained in:
parent
394512b274
commit
923b1657d9
@ -434,7 +434,6 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
|
|||||||
const ClutterPaintVolume *another_pv)
|
const ClutterPaintVolume *another_pv)
|
||||||
{
|
{
|
||||||
ClutterPaintVolume aligned_pv;
|
ClutterPaintVolume aligned_pv;
|
||||||
static const int key_vertices[4] = { 0, 1, 3, 4 };
|
|
||||||
|
|
||||||
g_return_if_fail (pv != NULL);
|
g_return_if_fail (pv != NULL);
|
||||||
g_return_if_fail (pv->is_axis_aligned);
|
g_return_if_fail (pv->is_axis_aligned);
|
||||||
@ -452,10 +451,7 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
|
|||||||
|
|
||||||
if (pv->is_empty)
|
if (pv->is_empty)
|
||||||
{
|
{
|
||||||
int i;
|
_clutter_paint_volume_set_from_volume (pv, another_pv);
|
||||||
for (i = 0; i < 4; i++)
|
|
||||||
pv->vertices[key_vertices[i]] = another_pv->vertices[key_vertices[i]];
|
|
||||||
pv->is_2d = another_pv->is_2d;
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user