[PATCH weston 3/4] gl-renderer: use eglCreatePlatformWindowSurfaceEXT to get EGLSurfaces
Daniel Stone
daniel at fooishbar.org
Fri Mar 20 14:55:51 PDT 2015
On Friday, March 20, 2015, Bill Spitzak <spitzak at gmail.com> wrote:
>
> The void* cast has to read "xid ? (void*)&xid : (void*)0" to handle the
> NULL correctly that other calls use.
Well, and the minor matter that it breaks all other platforms. Again, see
the patch - the Wayland backend passes in a struct wl_surface * to both.
Your version would have us passing a wl_surface **, which would be entirely
broken. Ditto GBM. Hence the slightly awkward dance.
Your patch would give us open-coded X11 and non-X11 variants, though I do
appreciate the honesty in your prototype taking 'Window xid' as a
parameter, hinting at the reality that it does not, in fact, work anywhere
else.
> If in fact it actually *writes* the xid (does it?) then the argument has
> to be a Window* xid_p, and this argument is is just (void*)xid_p while the
> second one is xid_p?*xid_p:0. I find this doubtful as that would require
> many changes to the calling code to handle the xid changing.
>
No, it does not write the XID.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150320/deaf1410/attachment-0001.html>
More information about the wayland-devel
mailing list