Commit graph

15 commits

Author SHA1 Message Date
Simon Ser
ceb4a1ff9e
Replace liftoff_device_apply with liftoff_output_apply
Compositors need to drive multiple connectors, each with its own vblank timings.
For each device, there's one separate rendering loop per output.

It's not possible to call liftoff_device_apply each time we want to submit a new
frame to one output, because this could touch another's output state, submitting
a new frame there in the process. When the other output will submit a new frame,
it'll get EBUSY (can't submit two frames without waiting for vblank).

Closes: https://github.com/emersion/libliftoff/issues/21
2019-11-24 18:13:40 +01:00
Simon Ser
44d65288d7
Fixup display → device bulk rename
I managed to do a bit of a mess here.

Fixes: b0e2b083f9 ("Rename display to device")
2019-11-24 13:07:12 +01:00
Matt Hoosier
78cc612f10 example: improve CRTC search algorithm
Add a fallback case for finding an eligible CRTC for the
selected connector. The encoder picked may not have been
wired up to that connector by the previous DRM master.
2019-11-08 00:08:06 +01:00
Simon Ser
b06596085d
example/multi-output: new example
This example sets up libliftoff with multiple outputs, with a fixed number of
layers per output.
2019-10-30 18:54:21 +01:00
Simon Ser
29dfe66ecf
example: add dynamic example
This example demonstrates how incremental layer updates should be applied. It
contains a basic rendering loop. Each layers has a back-buffer and a
front-buffer. The color of one of the layers will change at each frame.
2019-10-15 12:08:02 +03:00
Simon Ser
76cca57504
example: add a description of each example 2019-10-15 11:55:23 +03:00
Simon Ser
927efe09d2
example/compositor: handle out-of-bounds coords when compositing 2019-10-11 22:54:54 +03:00
Simon Ser
d63b4291da
example/compositor: take advantage of the composition layer
Create a special layer that we will use only for composition.

If we manage to put all other layers into planes, we don't need to use it.
Otherwise, blend other layers that didn't make it in a plane.
2019-10-11 14:31:17 +03:00
Simon Ser
fe1ee8563d
example/compositor: add flag to specify number of layers 2019-09-30 12:25:38 +03:00
Simon Ser
de7a7fe5f9
example/compositor: new example 2019-09-25 15:58:38 +03:00
Simon Ser
03679c9303
example/simple: don't hardcode number of layers, use white background 2019-09-25 15:16:14 +03:00
Simon Ser
a30668b06e
example: refactor dumb FB helper
This is necessary for the upcoming composer example.
2019-09-25 15:06:46 +03:00
Simon Ser
a7128585fe
example: extract helpers into separate file 2019-09-25 14:08:07 +03:00
Simon Ser
42b58e8802
example/simple: disable CRTCs we don't use 2019-09-25 12:26:06 +03:00
Simon Ser
3999474b32
Move example to its own directory 2019-09-16 23:41:19 +03:00