Commit Graph

4 Commits

Author SHA1 Message Date
Simon Ser 766a24fa77 render/allocator: add wlr_allocator.buffer_caps
This allows users to know the capabilities of the buffers that
will be allocated. The buffer capability is important to
know when negotiating buffer formats.
2021-05-31 15:50:13 -04:00
Simon Zeni a8c91fbac9 render/shm_allocator: make wlr_shm_allocator_create return a wlr_allocator 2021-04-28 20:55:57 +02:00
Simon Ser 24fde77c62 buffer: add format param to get_data_ptr
Allow wlr_buffer_impl.get_data_ptr to return a format.

This allows the Pixman renderer to not care about get_dmabuf/get_shm,
and only care about get_data_ptr. This will also help with [1], because
client wl_shm buffers can't implement get_shm.

[1]: https://github.com/swaywm/wlroots/pull/2892

References: https://github.com/swaywm/wlroots/issues/2864
2021-04-27 20:36:03 +02:00
Simon Ser c6b009ef85 render: introduce shared memory allocator
It allocates in local main memory via shm_open, and provides a FD
to allow sharing with other processes.

This is suitable for software rendering under the Wayland and X11
backends.
2021-04-17 09:54:39 +02:00