Simon Ser
8a95d52890
build: bump version to 0.3.0-dev
...
Makes it clear this is a development version. See [1].
[1]: https://github.com/swaywm/sway/pull/6730
2022-05-24 12:15:11 +02:00
Simon Ser
ac919002ca
build: bump version to 0.3.0
2022-02-10 13:57:06 +01:00
Simon Ser
378ccb4f84
test/alloc: add zpos-3x-zero-alpha
...
References: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/59
2022-01-31 14:29:16 +01:00
Simon Ser
223e288ae6
test/alloc: add zpos-3x-zero-fb-id
...
References: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/59
2022-01-31 14:26:20 +01:00
Simon Ser
b9ca919009
Ignore invisible layers in layer_intersects
...
Closes: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/59
2022-01-31 14:25:54 +01:00
Simon Ser
7a06f8c597
test/alloc: rename composition-zero-fb-id to composition-no-props
...
This is more consistent with other test names.
2022-01-31 14:05:58 +01:00
Simon Ser
3004a0dcbd
test/alloc: move zero-fb-id-fail to test data
2022-01-31 14:03:47 +01:00
Simon Ser
998d8c6a59
test/alloc: drop test_needs_composition logic
...
This was fine for simple test cases, but would need to become
more complicated for cases where e.g. zero FB_ID or alpha is
involved. Let's just hardcode the expected value in the test data
instead.
2022-01-31 14:00:20 +01:00
Simon Ser
61a8b85059
test/alloc: pass full test_case to run_test
...
More metadata will be added to the test_case struct soon.
2022-01-31 14:00:20 +01:00
Simon Ser
addeaf6097
test/alloc: replace test_layer.zpos with test_prop
...
This allows setting arbitrary props.
2022-01-31 13:39:47 +01:00
Simon Ser
32f97b1c51
test/alloc: check test_layer.compat length
...
Avoid iterating past the array bounds as a safety net. We should
have more than enough room for now, but let's make sure we don't
get caught.
2022-01-31 13:30:45 +01:00
Simon Ser
3ced3be25a
test/alloc: make test data const
...
We should never mutate the test data.
2022-01-31 13:29:58 +01:00
Simon Ser
2e1dd93b60
test/alloc: add zpos-2x-fail
2021-12-14 18:57:04 +01:00
Simon Ser
1db99c213c
test/alloc: add zpos-2x-reverse
2021-12-14 18:57:04 +01:00
Simon Ser
76f456d62e
Check layers zpos over the primary plane
...
The following commits contain tests for the pathological cases.
2021-12-14 18:57:04 +01:00
Simon Ser
40ba530616
ci: add .gitlab-ci.yml
2021-12-14 17:05:49 +01:00
Simon Ser
28d074e5ab
ci: drop py3-setuptools from Alpine packages
...
The upstream bug has been fixed.
2021-10-25 15:16:23 +02:00
Simon Ser
6166e23127
Migrate to gitlab.freedesktop.org
2021-10-25 15:01:58 +02:00
Simon Ser
b7a6958bca
ENOSPC is not fatal for test-only commits
...
drm_atomic_plane_check may return it for an invalid SRC coord.
2021-10-08 13:00:40 +02:00
Simon Ser
70eca070b6
Make plane_get_property static
2021-09-30 14:57:19 +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
aa30b8fb97
Log number of atomic test-only commits
2021-09-30 09:41:39 +02:00
Simon Ser
bc0d0617ac
Remove test/include/
...
Let's just put header files in test/, no need for a separate subdir.
2021-08-13 22:04:28 +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
120ad6fb73
build: turn on additional warnings
...
Functions without a prototype can be static, we don't want to deal
with alloca, and undefined definitions should be tested with #ifdef.
2021-08-13 15:40:35 +02:00
Simon Ser
447a9e8921
Document why the primary plane is a special case
...
For instance, i915 requires the primary plane to be enabled.
2021-08-13 12:38:05 +02:00
Simon Ser
8a971695bd
test: introduce liftoff_mock_require_primary_plane
...
This allows to mimick i915's requirement of failing all commits
which don't have the primary plane enabled.
We could expand our test matrix to test with the param *and* without
it, but since enabling the param just makes the atomic check more
strict there's no real benefit of doing that. Enabling the param
can only make tests fail more often, not the other way around.
2021-08-13 12:28:13 +02:00
Simon Ser
149e149643
Improve alloc debug logging
...
Don't increase indent when skipping a plane. Better indent layer
and plane logs.
2021-08-13 09:23:16 +02:00
Simon Ser
8360818a7e
Zero-initialize alloc_step and alloc_result
...
Avoids having to deal with uninitialized memory issues.
2021-08-12 19:30:34 +02:00
Simon Ser
cc3eec82fd
Print alloc debug logs as a tree
...
The allocation process explores a tree, let's represent that tree
in the debug logs.
2021-08-12 19:27:17 +02:00
Simon Ser
f88df73fad
Log when a test-only commit fails
2021-08-12 19:12:08 +02:00
Simon Ser
b941c3eb03
Log number of layers in output_log_layers
...
This can help figuring out if there are disabled layers.
2021-08-12 18:36:52 +02:00
Simon Ser
8f8c4d18a5
test: make sure NDEBUG is not defined
...
If NDEBUG is defined, then assert() becomes a no-op. Make sure it's
not.
2021-08-12 18:15:50 +02:00
Simon Ser
fe76702dfb
Log number of candidate planes
...
This can be useful to figure out why liftoff_output_apply returns
an empty plane allocation.
2021-08-09 13:08:48 +02:00
Simon Ser
30ba835645
Log when no layer has been a plane
2021-08-09 12:58:35 +02:00
Simon Ser
9a6a7aaa87
Make fp16_to_double static
...
This prevents this internal symbol from being leaked in the
library's symbol table.
2021-08-09 12:50:32 +02:00
Simon Ser
7f07d398d1
Improve prop value pretty-printing in output_log_layers
...
Always print the sign when logging a signed value. Print the
full floating point value when logging an fp16 prop. SRC_X amd
SRC_Y are fp16 too.
2021-08-09 12:48:30 +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
87e5dcfe72
build: bump version to 0.2.0
2021-08-09 11:29:05 +02:00
Simon Ser
89c1d37547
Make liftoff_layer_set_property return negative errno
...
This allows the caller to check for errors.
2021-08-09 11:27:08 +02:00
Simon Ser
516cf9404d
Stop including stdbool.h from libliftoff.h
...
We don't use bool there anymore.
2021-07-30 16:22:58 +02:00
Simon Ser
f5a2b541ce
Make liftoff_device_register_all_planes return an int
...
For consistency with liftoff_output_apply.
2021-07-30 16:19:29 +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
a58b638736
build: bump version to 0.1.0
2021-07-01 14:34:53 +02:00
Simon Ser
37a5f27e89
readme: link to the example/ dir
2021-07-01 13:24:28 +02:00
Simon Ser
2e4254b124
readme: link to compositor guidelines
2021-07-01 13:23:26 +02:00
Simon Ser
b94f1e104f
doc/compositor: new document
2021-07-01 13:20:46 +02:00
Simon Ser
326c8d67ad
Fixup reference to liftoff_layer_get_plane_id in docs
2021-07-01 13:14:23 +02:00
Simon Ser
f1c2ac1981
readme: update short description
2021-07-01 11:55:25 +02:00
Simon Ser
27614202d2
readme: add missing liftoff_device_register_all_planes call
2021-07-01 11:52:58 +02:00