Commit Graph

27 Commits

Author SHA1 Message Date
Simon Ser 60b7267e18 export-dmabuf-v1: use wlr_output_event_commit.buffer 2021-12-03 14:56:17 +00:00
Simon Ser a04cfca4da Remove support for DMA-BUF flags
They are never used in practice, which makes all of our flag
handling effectively dead code. Also, APIs such as KMS don't
provide a good way to deal with the flags. Let's just fail the
DMA-BUF import when clients provide flags.
2021-11-17 16:12:59 +00:00
Simon Ser f20c49d78a export-dmabuf-v1: stop using wlr_output_export_dmabuf 2021-11-08 15:57:19 +00:00
Simon Ser bcd5d8504c output: remove wlr_output_impl.export_dmabuf
No backend is using it anymore.
2021-07-12 13:29:03 -04:00
Simon Ser f0945e112f export-dmabuf: export DMA-BUF on output commit
We were previously exporting DMA-BUFs when receiving the capture_output
request, and sending a done event on wlr_output.events.precommit. Instead,
export and send done on wlr_output.events.commit.
2020-11-05 09:43:42 +01:00
Andri Yngvason 034384f5aa export-dmabuf: Keep frame->output = NULL until frame is ready
This fixes a crash that happens when a client requests a frame on a
backend that does not implement export_dmabuf.

An assertion fails with the message:
sway: types/wlr_output.c:777: wlr_output_lock_attach_render: Assertion
`output->attach_render_locks > 0' failed.
2020-06-01 12:50:26 +02:00
Andri Yngvason e51d507799 export-dmabuf: Schedule output frame on request
A client requesting frames in the ready callback may miss frames that
happen while it is waiting to receive the event or sending the request.
If that happens, the client will have an outdated frame for an
indefinite period. A new frame might not be scheduled for a very long
time.

With this change, clients will receive new frames immediately upon
request.
2020-04-27 15:40:03 +02:00
Simon Ser 5cde35923c Simplify globals implementation by removing destructors
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
2019-11-25 09:01:46 -05:00
Jason Francis d20aee6c9d export-dmabuf-v1: fix segfault on output disable 2019-08-01 19:00:48 +03:00
Simon Ser 6c659da98b output: introduce wlr_output_lock_attach_render
This allows screen shooters and screen grabbers to ensure rendering will be
used instead of direct scan-out.
2019-06-07 09:06:11 -04:00
Simon Ser 31dcecbfa9 output: rename swap_buffers event to precommit
Also remove damage from the event data since it's no longer tied to commits.
2019-04-23 14:34:30 -06:00
emersion 1256314afe
export-dmabuf-v1: add missing destroy request handler
Also document lists in the header file.
2018-12-06 19:08:28 +01:00
emersion 3df602a62d export-dmabuf: disable hardware cursors if desired
Also make the frame resource inert when sending "ready".
2018-09-18 11:48:04 +02:00
emersion 5dbf0fe7f2 linux-dmabuf: add v1 suffix
This prevents some future conflicts with the stable version.

Fixes #1133
2018-07-19 21:50:05 +01:00
Arvin Ignaci fad62a3e1c fix: handle 32 bit time_t (or smaller) 2018-07-09 14:45:19 +00:00
Dominique Martinet 1fef1f88b2 export dmabuf manager_handle_capture_output: fix leak on error
Found through static analysis
2018-06-30 11:47:25 +09:00
emersion bd0c1b7949
export-dmabuf: update protocol 2018-06-17 14:19:45 +01:00
emersion 21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
emersion 2681352e04
export-dmabuf: permanently fail if backend doesn't implement export_dmabuf 2018-05-29 18:47:19 +01:00
emersion a16ad4327a
Update protocol 2018-05-29 18:47:19 +01:00
emersion 65198b0aab
export-dmabuf: assert number of planes 2018-05-29 18:47:19 +01:00
emersion 2432c41a49
export-dmabuf: correctly send the number of planes per layer 2018-05-29 18:47:18 +01:00
emersion 3f9796112e
export-dmabuf: fix tv_sec_hi 2018-05-29 18:47:18 +01:00
emersion 00e108f2fc
export-dmabuf: correctly finish wlr_linux_dmabuf_attribs 2018-05-29 18:47:18 +01:00
emersion 1377e551ef
Update wlr-export-dmabuf protocol 2018-05-29 18:47:18 +01:00
emersion e26f4dff98
export-dmabuf: wait for the frame to be ready, send timestamp 2018-05-29 18:47:17 +01:00
emersion 36bd4795d4
export-dmabuf: add basic and incomplete implementation 2018-05-29 18:47:17 +01:00