This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34a4f09
to
7377d57
Compare
This was referenced Apr 15, 2021
7377d57
to
e6fe785
Compare
0643907
to
66a371e
Compare
This was referenced Apr 26, 2021
c84f497
to
a0d6f25
Compare
b0cb8e6
to
5173049
Compare
Been testing this for a while, seems to work fine so far. Apart from the minor performance gains for most users, the main motivation for this is:
I'll self-review this one more time before marking the PR as ready. One gotcha is that with this change the GLES2 backend ref'counts |
5173049
to
e84e964
Compare
Emantor
approved these changes
May 16, 2021
This allows the DMA-BUF wl_buffer objects to be used directly as wlr_buffers, without having to use wlr_client_buffer_import.
This centralizes the wlr_texture initialization. In future commits, more fields will need to get initialized.
This adds a a function to create a wlr_texture from a wlr_buffer. The main motivation for this is to allow the renderer to create a single wlr_texture per wlr_buffer. This can avoid needless imports by re-using existing textures.
Make it so wlr_gles2_texture is ref'counted (via wlr_buffer). This is similar to wlr_gles2_buffer or wlr_drm_fb work. When creating a wlr_texture from a wlr_buffer, first check if we already have a texture for the buffer. If so, increase the wlr_buffer ref'count and make sure any changes made by an external process are made visible (by invalidating the texture). When destroying a wlr_texture created from a wlr_buffer, decrease the ref'count, but keep the wlr_texture around in case the caller uses it again. When the wlr_buffer is destroyed, cleanup the wlr_texture.
We can just use the wlr_dmabuf_v1_buffer directly, no need to wrap it in a wlr_client_buffer.
e84e964
to
801c834
Compare
kennylevinsen
approved these changes
May 17, 2021
Thanks for the reviews! |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a client creates a
wl_buffer
and attaches it to awl_surface
, there's a good chance they're going to re-use it.References: #2664