eglSwapBuffer blocks without any shell surface query!

Pekka Paalanen ppaalanen at gmail.com
Wed Jun 8 07:57:34 UTC 2016


On Wed, 8 Jun 2016 10:49:43 +0530
Vikas Patil <vikasmpatil at gmail.com> wrote:

> Dear All,
> 
> What if I don't use any shell/shell surface in GLES/EGL based
> application with wayland/weston? Will eglSwapBuffer blocks in that
> case? Is using any shell surface must?

If you do not use any shell protocol, or give any other role to the
wl_surface, the wl_surface will not be shown. See:
https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface

> I am fine if application doesn't display but it should run and not
> block without shell surface. I am trying to understand behavior of
> eglSwapBuffer and why it is blocking?

The blocking is expected and intentional. If you do not want to block,
set eglSwapInterval to zero.

The reason for blocking is that eglSwapBuffers is defined to throttle
to display updates through the eglSwapInterval setting. The Wayland
interpretation of this is to use the wl_surface.frame callback for
throttling when swap interval is one (the default). This produces the
throttling required by the EGL spec.

Frame callbacks depend on the surface being shown, because otherwise
the compositor cannot determine which output it should be synchronizing
to. Another reason is the very definition of the frame callback, to let
applications avoid drawing frames that will not be shown.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160608/e804f5c3/attachment.sig>


More information about the wayland-devel mailing list