[RFC 0/4] New wayland-egl functions for swapping
John Kåre Alsaker
john.kare.alsaker at gmail.com
Sat Mar 2 17:26:10 PST 2013
This patchset introduces wl_egl_window_take_buffer and wl_egl_window_commit to the native wayland-egl platform.
wl_egl_window_take_buffer gives a way to get a wl_buffer from an wl_egl_window.
The application is expected to attach this to one or multiple wl_surfaces and the EGL implementation
will listen to it's release event before it reuses the buffer.
This has a couple of advantages over eglSwapBuffers:
- It's always non-blocking, clients doesn't have to ensure swap interval is 0
- Client are in control of the damage, attach and commit requests.
I find that to be cleaner and wouldn't require an extension to specify damage.
- You can attach a wl_buffer to multiple wl_surfaces.
For example you could use a single buffer for 4 window decorations subsurfaces and
perhaps even draw decorations with a single draw call.
- We can remove the ugly commit mode setting in the subsurfaces proposal.
It's no longer required since EGL won't do commit on subsurfaces.
wl_egl_window_commit will commit the surface and use EGL's policy regarding waiting on frames.
wl_egl_window_take_buffer followed by wl_egl_window_commit is equivalent to eglSwapBuffers
only that you can specify damage without an extensions. It's more of a natural complement of
wl_egl_window_take_buffer than a required function.
--
1.8.1.4
More information about the wayland-devel
mailing list