mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-18 10:27:00 +01:00
Add support for the rotation property
This commit is contained in:
parent
234dce4f20
commit
95da3ee649
3 changed files with 8 additions and 0 deletions
4
plane.c
4
plane.c
|
@ -216,6 +216,10 @@ bool plane_apply(struct liftoff_plane *plane, struct liftoff_layer *layer,
|
|||
layer_prop->value == 0xFFFF) {
|
||||
continue; /* Layer is completely opaque */
|
||||
}
|
||||
if (strcmp(layer_prop->name, "rotation") == 0 &&
|
||||
layer_prop->value == DRM_MODE_ROTATE_0) {
|
||||
continue; /* Layer isn't rotated */
|
||||
}
|
||||
*compatible = false;
|
||||
drmModeAtomicSetCursor(req, cursor);
|
||||
return true;
|
||||
|
|
|
@ -57,6 +57,7 @@ tests = {
|
|||
],
|
||||
'prop': [
|
||||
'alpha',
|
||||
'rotation',
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@ int main(int argc, char *argv[]) {
|
|||
if (strcmp(test_name, "alpha") == 0) {
|
||||
require_prop_value = (uint16_t)(0.5 * 0xFFFF);
|
||||
default_value = 0xFFFF; /* opaque */
|
||||
} else if (strcmp(test_name, "rotation") == 0) {
|
||||
require_prop_value = DRM_MODE_ROTATE_180;
|
||||
default_value = DRM_MODE_ROTATE_0;
|
||||
} else {
|
||||
fprintf(stderr, "no such test: %s\n", test_name);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue