[Mesa-dev] [Bug 103225] Deprecated wl_buffer still mentioned in EGL/eglmesaext.h
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Oct 12 06:43:22 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103225
--- Comment #1 from Pekka Paalanen <ppaalanen at gmail.com> ---
struct wl_buffer has two different meanings:
- On client side, wl_buffer is a protocol object type, which has not been
deprecated. It is still valid, used and necessary. There is no definition for
'struct wl_buffer', it is a purely abstract opaque type. This definition is
used by eglCreateWaylandBufferFromImageWL()
- On server side, there used to be a definition for 'struct wl_buffer' which is
what you refer to in wayland-server.h, that has since been deprecated. This is
never used by any EGL API anymore. It used to be used by
eglQueryWaylandBufferWL() until that was changed to use wl_resource instead (a
binary compatible change). Server side is supposed to no longer use a struct
wl_buffer type at all.
While both server and client side had the same wl_buffer pointer type, the
underlying definition has never been the same. The client side thing is
actually a struct wl_proxy.
For backwards compatibility, one could not simply remove the definition of
struct wl_buffer from wayland-server.h. It was made conditional on not defining
WL_HIDE_DEPRECATED. If you #define WL_HIDE_DEPRECATED (and do any code fixes
required), you won't get the warning anymore.
However, strictly speaking one cannot define WL_HIDE_DEPRECATED in EGL headers.
Programs need to define it themselves as it changes the expectations on how
they are written. Defining it in EGL headers could theoretically break
someone's build.
I'm not sure what we could do. Simply #including wayland-server.h followed by
eglmesaext.h will raise the warning, but the programmer is not doing anything
wrong.
Each program can fix this on their own by defining WL_HIDE_DEPRECATED before
including any headers. This is also recommended practise since the things are
deprecated for a reason. Would this be an acceptable solution for you?
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171012/9df5b986/attachment.html>
More information about the mesa-dev
mailing list