Simon Ser
ee3769e678
test: add prop@fb-damage-clips
...
Ensure that FB_DAMAGE_CLIPS is ignored if a plane is missing the
property.
2024-05-15 22:12:28 +02:00
Simon Ser
ce325b1ee6
Turn on -Wsign-conversion
...
References: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/74
2023-02-16 21:33:36 +01:00
Simon Ser
99ed53677a
Turn on -Wdeclaration-after-statement
...
Enforces code style.
2023-02-16 20:03:42 +01:00
Simon Ser
9e44872217
test/prop: add range/enum/bitmask tests
2023-02-16 12:36:24 +01:00
Simon Ser
a002a240e9
test/prop: simplify by introducing commit() function
2023-02-15 20:12:37 +01:00
Simon Ser
8ec1203e64
test: add IN_FORMATS test
2023-02-15 19:19:24 +01:00
Simon Ser
0811ce855b
test/libdrm_mock: take initial prop value as separate arg
...
drmModePropertyRes.values never holds the current value. Stop
abusing this field.
2023-02-15 18:39:57 +01:00
Simon Ser
9c84f7945a
Introduce liftoff_layer_unset_property()
...
This can be used when a propperty doesn't have a default/no-op
value, such as COLOR_ENCODING and COLOR_RANGE.
2022-08-05 23:10:14 +02:00
Simon Ser
408b6e5463
test/test_prop: add unmatched test case
...
Add a test case where the plane doesn't have a property set on the
layer.
2021-09-30 14:54:33 +02:00
Simon Ser
32683879e7
Add newline after function return type
...
Aligns our style with Linux' and Weston's.
2021-08-13 22:02:33 +02:00
Simon Ser
6321e7c5aa
Add needs_composition APIs
...
Right now, compositors are expected to query liftoff_layer_get_plane_id to
decide whether a layer needs to be composited.
However there are cases where a layer has no plane, but still doesn't need
composition (e.g. when FB_ID is zero or when alpha is zero, in the future when
the layer is out of CRTC bounds etc).
Add a new API to make users' life simpler.
Closes: https://github.com/emersion/libliftoff/issues/54
2021-08-09 11:56:55 +02:00
Simon Ser
61fd4c099a
Make liftoff_output_apply return an int
...
Callers may want to get more details about the failure, in
particular EPERM indicates that the user isn't DRM master (can
happen on VT switch).
2021-07-27 12:28:00 +02:00
Simon Ser
bcb6e3cfb8
Replace liftoff_layer_get_plane_id with liftoff_layer_get_plane
...
Users can get back the plane ID with liftoff_plane_get_id.
2021-07-01 11:49:36 +02:00
Simon Ser
562f8b0af6
Allow to choose which planes are managed by libliftoff
...
Closes: https://github.com/emersion/libliftoff/issues/10
2021-07-01 11:37:10 +02:00
Simon Ser
b08bbaa5e6
Split liftoff_log_init into set_handler and set_priority
...
This allows callers to change only one of those, without the other.
Also rename importance to priority and func to handler.
2021-03-31 12:44:24 +02:00
Simon Ser
eaf52b49fc
test: add test with immutable zpos plane props
...
Closes: https://github.com/emersion/libliftoff/issues/50
2020-12-05 18:52:52 +01:00
Simon Ser
92fbebbe88
test: add missing plane alpha prop to prop@ignore-alpha
...
The plane would otherwise not be selected because it's missing the alpha prop.
2020-12-05 18:34:37 +01:00
Simon Ser
679e2bb0cd
Allow caller to pass commit flags
...
When the caller wants to perform a modeset, they will need to pass
DRM_MODE_ATOMIC_ALLOW_MODESET in the atomic commit flags, otherwise the driver
will fail the commit. libliftoff also needs to provide these flags in its
test-only commits.
2020-11-10 16:27:55 +01:00
Simon Ser
b0042828ad
test: add test with fully transparent layer
2020-05-26 21:30:31 +02:00
Simon Ser
6d4e22a5f8
test: a test-only commit doesn't apply properties
...
This fixes a misunderstanding of the DRM API. Only a regular commit applies
properties.
Fixes: b16078769e
("test/libdrm_mock: a test-only commit applies properties")
2020-05-26 18:49:04 +02:00
Simon Ser
95da3ee649
Add support for the rotation property
2020-05-26 11:35:50 +02:00
Simon Ser
234dce4f20
test: add test for alpha prop
2020-05-22 17:44:41 +02:00