<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Deprecated wl_buffer still mentioned in EGL/eglmesaext.h"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103225#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Deprecated wl_buffer still mentioned in EGL/eglmesaext.h"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=103225">bug 103225</a>
              from <span class="vcard"><a class="email" href="mailto:ppaalanen@gmail.com" title="Pekka Paalanen <ppaalanen@gmail.com>"> <span class="fn">Pekka Paalanen</span></a>
</span></b>
        <pre>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?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>