[mutter] shaped-texture: Swap 90 and 270 degree transforms in pipeline matrix
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] shaped-texture: Swap 90 and 270 degree transforms in pipeline matrix
- Date: Tue, 26 Jul 2022 19:16:11 +0000 (UTC)
commit d644a40cf528e9c521988d861bdcb94c0b89ca5f
Author: Robert Mader <robert mader posteo de>
Date: Tue Jun 14 19:01:27 2022 +0200
shaped-texture: Swap 90 and 270 degree transforms in pipeline matrix
With `META_MONITOR_TRANSFORM` values matching their `WL_OUTPUT_TRANSFORM`
counterparts, the definition from the Wayland spec applies: the
`META_MONITOR_TRANSFORM` value tells us how the output was rotated
and that the buffer was drawn by the client to compensate for that.
The matrix describes the transformation from surface- to buffer-
coordinates, so the operation we need here is the same one that
the client applied (not from buffer- to surface-coordinates, i.e.
the inverse).
While on it fix `FLIPPED_90` and `FLIPPED_270` to use the correct
axes: flip on the x-axis, rotation on the z-axis.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2459>
src/compositor/meta-shaped-texture.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 34fec6852a..d7cba799ea 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -341,7 +341,7 @@ get_base_pipeline (MetaShapedTexture *stex,
switch (stex->transform)
{
case META_MONITOR_TRANSFORM_90:
- graphene_euler_init_with_order (&euler, 0.0, 0.0, 90.0,
+ graphene_euler_init_with_order (&euler, 0.0, 0.0, 270.0,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_180:
@@ -349,7 +349,7 @@ get_base_pipeline (MetaShapedTexture *stex,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_270:
- graphene_euler_init_with_order (&euler, 0.0, 0.0, 270.0,
+ graphene_euler_init_with_order (&euler, 0.0, 0.0, 90.0,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_FLIPPED:
@@ -357,7 +357,7 @@ get_base_pipeline (MetaShapedTexture *stex,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_FLIPPED_90:
- graphene_euler_init_with_order (&euler, 180.0, 0.0, 90.0,
+ graphene_euler_init_with_order (&euler, 0.0, 180.0, 90.0,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_FLIPPED_180:
@@ -365,7 +365,7 @@ get_base_pipeline (MetaShapedTexture *stex,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_FLIPPED_270:
- graphene_euler_init_with_order (&euler, 180.0, 0.0, 270.0,
+ graphene_euler_init_with_order (&euler, 0.0, 180.0, 270.0,
GRAPHENE_EULER_ORDER_SYXZ);
break;
case META_MONITOR_TRANSFORM_NORMAL:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]