Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

render/gles2: make EGL context current in bind_buffer #2640

Merged
merged 1 commit into from
Jan 16, 2021

Conversation

emersion
Copy link
Member

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: #2618
References: #2615 (comment)

cc @bl4ckb0ne @any1


This is not a breaking change because wlr_renderer_bind_buffer is a private wlroots API.

@any1
Copy link
Contributor

any1 commented Jan 14, 2021

With this I should be able to do what you suggested in #2615 (comment), right?

@emersion
Copy link
Member Author

Yes, I believe this should work.

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)
@emersion emersion merged commit afdf4dc into swaywm:master Jan 16, 2021
@emersion emersion deleted the egl-ctx-bind-buffer branch January 16, 2021 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants