-
Notifications
You must be signed in to change notification settings - Fork 342
Conversation
I haven't looked in detail yet, but
I think we can just |
Hmm, yeah, you're most likely right. I wasn't thinking in terms of the "global picture"; just what would be needed to call |
I tried using |
I think this would be a good change, and it's also needed to remove the EGL dependency from the backends. Would you mind opening a PR for this?
I think saving/restoring makes sense when we need to temporarily set the EGL context in a single function (like |
Yeah, I'll give it a go |
Instead of requiring callers to manually make the EGL context current before binding a buffer and unsetting it after unbinding a buffer, do it inside wlr_renderer_bind_buffer. This hides renderer-specific implementation details inside the wlr_renderer interface. Non-GLES2 renderers may not use EGL. This removes almost all EGL dependencies from the backends, the only remaining one is wlr_renderer_autocreate args. References: swaywm#2618 References: swaywm#2615 (comment)
Instead of requiring callers to manually make the EGL context current before binding a buffer and unsetting it after unbinding a buffer, do it inside wlr_renderer_bind_buffer. This hides renderer-specific implementation details inside the wlr_renderer interface. Non-GLES2 renderers may not use EGL. This removes almost all EGL dependencies from the backends, the only remaining one is wlr_renderer_autocreate args. References: swaywm#2618 References: swaywm#2615 (comment)
Instead of requiring callers to manually make the EGL context current before binding a buffer and unsetting it after unbinding a buffer, do it inside wlr_renderer_bind_buffer. This hides renderer-specific implementation details inside the wlr_renderer interface. Non-GLES2 renderers may not use EGL. This removes all EGL dependencies from the backends. References: swaywm#2618 References: swaywm#2615 (comment)
Instead of requiring callers to manually make the EGL context current before binding a buffer and unsetting it after unbinding a buffer, do it inside wlr_renderer_bind_buffer. This hides renderer-specific implementation details inside the wlr_renderer interface. Non-GLES2 renderers may not use EGL. This removes all EGL dependencies from the backends. References: #2618 References: #2615 (comment)
Ah, still one missing piece is the DRM backend, which still uses the old infrastructure. This will be fixed in #2903. |
@any1, would you be willing to continue work on this? |
Yeah, sure. |
We should now be able to listen to output commits exclusively, check for |
fe5e63a
to
405dbe3
Compare
I believe I have adapted my previous changes to master now. It does seem to work with wayvnc on both the wayland and headless backends at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks pretty good!
405dbe3
to
0011ee1
Compare
Ready to merge with that one last cleanup comment fixed |
This simplifies the implementation considerably.
0011ee1
to
c29bf11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This simplifies screencopy by copying pixels to shm in the commit callback rather than the pre-commit callback, so both dmabuf and shm buffers are handled in commit.
Because commit always happens after pre-commit, damage accumulation is also simplified because we no longer need to ascertain whether the damage callback or the frame-copy callback happened first.
Supersedes #2591