-
Notifications
You must be signed in to change notification settings - Fork 342
render/pixman: avoid copy when creating textures #2892
Conversation
0643907
to
2cc968c
Compare
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]: swaywm#2892 References: swaywm#2864
bee9a4a
to
df0436c
Compare
With this PR, the |
df0436c
to
83aa4c1
Compare
The last commit contains an attempt at fixing the SIGBUS issue (see #2864). It adds guards to data ptr accesses to allow Some questions:
cc @bl4ckb0ne |
6a147ca
to
9b5d1c4
Compare
This new API allows buffer implementations to know when a user is actively accessing the buffer's underlying storage. This is important for the upcoming client-backed wlr_buffer implementation.
Introduce wlr_shm_client_buffer, which provides a wlr_buffer wrapper around wl_shm_buffer. Because the client can destroy the wl_buffer while we still are using it, we need to do some libwayland tricks to still be able to continue accessing its underlying storage. We need to reference the wl_shm_pool and save the data pointer.
9b5d1c4
to
80c2523
Compare
No: in the case of
We can't easily provide such an interface with |
This is now ready for review. |
This allows the Pixman renderer to stop
memcpy
'ing textures.Depends on: #2851
cc @bl4ckb0ne