mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
clutter/paint-volume: Union paint volumes correctly using Graphene
Since commit d2f8a30625
we use Graphene to union paint volumes, it
turns out a quite severe issue snuck in during review of that MR though:
Unioned paint volumes (so paint volumes of any actors with children) now
have negative heights. Once projected to 2d coordinates they luckily are
correct again, which is why everything is still working.
The problem is that obvious once looking closer: For the y coordinates
of the unioned paint volume we confused the maximum and the minimum
points and simply used the wrong coordinates to create the unioned paint
volume.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1827>
This commit is contained in:
parent
a7c4e8cefa
commit
cc912614c7
@ -585,10 +585,10 @@ clutter_paint_volume_union (ClutterPaintVolume *pv,
|
||||
|
||||
graphene_box_get_min (&union_box, &min);
|
||||
graphene_box_get_max (&union_box, &max);
|
||||
graphene_point3d_init (&pv->vertices[0], min.x, max.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[1], max.x, max.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[3], min.x, min.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[4], min.x, max.y, max.z);
|
||||
graphene_point3d_init (&pv->vertices[0], min.x, min.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[1], max.x, min.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[3], min.x, max.y, min.z);
|
||||
graphene_point3d_init (&pv->vertices[4], min.x, min.y, max.z);
|
||||
|
||||
if (pv->vertices[4].z == pv->vertices[0].z)
|
||||
pv->is_2d = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user