[clutter] paint-volumes: fix unioning with empty volumes
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] paint-volumes: fix unioning with empty volumes
- Date: Thu, 16 Jun 2011 11:58:45 +0000 (UTC)
commit 923b1657d9e5437de862a397a12495d6f75293f9
Author: Robert Bragg <robert linux intel com>
Date: Thu Jun 16 12:33:25 2011 +0100
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.
clutter/clutter-paint-volume.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter-paint-volume.c b/clutter/clutter-paint-volume.c
index cd9b931..057d1d1 100644
--- a/clutter/clutter-paint-volume.c
+++ b/clutter/clutter-paint-volume.c
@@ -434,7 +434,6 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
const ClutterPaintVolume *another_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->is_axis_aligned);
@@ -452,10 +451,7 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
if (pv->is_empty)
{
- int i;
- for (i = 0; i < 4; i++)
- pv->vertices[key_vertices[i]] = another_pv->vertices[key_vertices[i]];
- pv->is_2d = another_pv->is_2d;
+ _clutter_paint_volume_set_from_volume (pv, another_pv);
goto done;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]