Discussion:
Question regarding dri2_egl_display conversion
Jaeyong Yoo
2014-08-01 02:01:53 UTC
Permalink
_______________________________________________
mesa-dev mailing list
mesa-***@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Emil Velikov
2014-08-01 02:27:27 UTC
Permalink
Hello Mesa :-)
I'm reading the source code and I've got a simple question.
dri2_dpy = disp->DriverData;
which is casting _EGLDisplay->DriverData to dri2_egl_display *.
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
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Jaeyong Yoo
2014-08-01 03:39:46 UTC
Permalink
Post by Emil Velikov
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
Thanks, it is exactly what I want :-)

Jaeyong

Loading...