mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
backends/native: Fix checks for 'reflect-x' and 'reflect-y' bits
Checking for both bits at once means only one matching bit is
sufficient - very likely in case of `rotate-0'.
This fixes crashes on hardware that does not support 'reflect-'
bits when setting a flipped output transform.
While on it, also update the check for `reflect-y` instead of
`reflect-x` + `rotate-180`. They are logically equivalent,
however some hardware may support `reflect-y` but not both
other bits.
Fixes commit 4e3f3842a1
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2459>
This commit is contained in:
parent
9e71278488
commit
c6cf4bd9c3
@ -145,8 +145,8 @@ meta_kms_plane_update_set_rotation (MetaKmsPlane *plane,
|
||||
META_KMS_PLANE_ROTATION_REFLECT_X;
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_180:
|
||||
kms_rotation = META_KMS_PLANE_ROTATION_ROTATE_180 |
|
||||
META_KMS_PLANE_ROTATION_REFLECT_X;
|
||||
kms_rotation = META_KMS_PLANE_ROTATION_ROTATE_0 |
|
||||
META_KMS_PLANE_ROTATION_REFLECT_Y;
|
||||
break;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_270:
|
||||
kms_rotation = META_KMS_PLANE_ROTATION_ROTATE_270 |
|
||||
@ -170,11 +170,11 @@ meta_kms_plane_is_transform_handled (MetaKmsPlane *plane,
|
||||
case META_MONITOR_TRANSFORM_180:
|
||||
return plane->rotations & META_KMS_PLANE_ROTATION_ROTATE_180;
|
||||
case META_MONITOR_TRANSFORM_FLIPPED:
|
||||
return plane->rotations & (META_KMS_PLANE_ROTATION_ROTATE_0 |
|
||||
META_KMS_PLANE_ROTATION_REFLECT_X);
|
||||
return (plane->rotations & META_KMS_PLANE_ROTATION_ROTATE_0) &&
|
||||
(plane->rotations & META_KMS_PLANE_ROTATION_REFLECT_X);
|
||||
case META_MONITOR_TRANSFORM_FLIPPED_180:
|
||||
return plane->rotations & (META_KMS_PLANE_ROTATION_ROTATE_180 |
|
||||
META_KMS_PLANE_ROTATION_REFLECT_X);
|
||||
return (plane->rotations & META_KMS_PLANE_ROTATION_ROTATE_0) &&
|
||||
(plane->rotations & META_KMS_PLANE_ROTATION_REFLECT_Y);
|
||||
/*
|
||||
* Deny these transforms as testing shows that they don't work
|
||||
* anyway, e.g. due to the wrong buffer modifiers. They might as well be
|
||||
|
Loading…
Reference in New Issue
Block a user