[PATCH weston 1/3] clients: Drop deadlock circumvention hack now that we don't need it

Pekka Paalanen ppaalanen at gmail.com
Fri Aug 21 06:09:20 PDT 2015

On Wed, 19 Aug 2015 11:15:21 -0500
Derek Foreman <derekf at osg.samsung.com> wrote:

> On 26/01/15 04:19 AM, Jonas Ådahl wrote:
> > mesa supports EGLSwapInterval 0 now, so lets remove this hack. As a
> > bonus we don't conflict with the XDG shell protocol that doesn't allow
> > committing a null-buffer, which was a side effect of this hack.

Hmm, but the code removed here is *not* committing a null buffer.
Instead, it is doing a commit without an attach. Surely that is legal
even with an xdg_surface?

Btw. did we have any patches to xdg-shell spec to say that you cannot
attach and commit a null buffer? ISTR it has been discussed, yes, but I
couldn't see it in the spec on a quick look. Some patch in the queue?

> Unreviewed for far too long. :(
> The question I guess is whether toytoolkit needs to maintain this hack
> forever because mesa used to have a problem with this.  As far as I can
> tell from reading the EGL spec, eglSwapInterval(0) has been defined for
> as long as eglSwapInterval() has existed (EGL 1.1)...
> You've stated your preference - and I'm convinced.  I don't think
> toytoolkit apps should be a reference for avoiding old mesa bugs.  I'm
> also not hugely concerned about other broken EGL stacks... (if you're
> making a custom IVI with a nasty driver stack, you probably shouldn't be
> using toytoolkit at all, and if you are you can re-invent this nastiness.)
> Besides, the comments even say we should kill it now.
> All that said,
> Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
> Can we kill this hack? :)

Yeah, I think we should. Let's see if anyone complains afterwards.

Btw. I added a reference to
e9297f8e7ee09fa39b1d4293fad6e97705ccff21 which was the patch adding
this hack, it contains an elaborate explanation.

> > Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> > ---
> >  clients/window.c | 32 --------------------------------
> >  1 file changed, 32 deletions(-)

I was very close to pushing this, when I realized that only subsurfaces
client actually sets eglSwapInterval(0). Testing nested.c is also a bit
difficult because it requires cairo-glesv2, and it seems my distro has
dropped the possibility of that option from Cairo.

Looking at nested.c closer, I suspect it might be ok as is. The
sub-surface renderer does not call eglSwapbuffers on sub-surfaces

   1a912a9..decc965  master -> master

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

More information about the wayland-devel mailing list