[Mesa-dev] Question regarding dri2_egl_display conversion
Emil Velikov
emil.l.velikov at gmail.com
Thu Jul 31 19:27:27 PDT 2014
On 01/08/14 03:01, Jaeyong Yoo wrote:
> Hello Mesa :-)
>
> I'm reading the source code and I've got a simple question.
>
> In egl_dri2.c, I saw the following code:
>
> dri2_dpy = disp->DriverData;
>
>
> which is casting _EGLDisplay->DriverData to dri2_egl_display *.
>
> Also, I saw the following code:
>
> struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
>
> which is converting _EDLDisplay * to dri2_egl_display *.
>
> Are those two things the same?
>
> I'm trying to find the definition of "function" dri2_egl_display but failed.
>
Hi Jaeyong,
The function is wrapped with a help of _EGL_DRIVER_STANDARD_TYPECASTS and
_EGL_DRIVER_TYPECAST macros as defined in src/egl/main/egldriver.h
I must admit that personally I find them quite confusing and I tend to check
the preprocessed code just in case :)
-Emil
> Best regards,
>
> Jaeyong
>
>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list