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>
This commit is contained in:
parent
2ade26ebf8
commit
d644a40cf5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user