diff options
author | Chad Versace <[email protected]> | 2014-01-28 11:41:46 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2014-03-17 15:36:03 -0700 |
commit | 90502b18b2b868250ab7e9189810ca42b3c812a1 (patch) | |
tree | d8c18fecf90bdf2665c1cb6e1d14e3e2a81aea0a /src/egl/drivers/dri2/platform_android.c | |
parent | 38848b6217377064665e28441648352c2688edf3 (diff) |
egl/dri2: Move dri2_egl_display virtual funcs to vtbl
dri2_egl_display has only one virtual function, 'authenticate'. Define
dri2_egl_display::vtbl and move 'authenticate' there.
This prepares for the EGL platform extensions, which will add many
more virtual functions to dri2_egl_display.
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/platform_android.c')
-rw-r--r-- | src/egl/drivers/dri2/platform_android.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index cc19a611349..3a8f6bbe8d7 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -652,6 +652,10 @@ droid_log(EGLint level, const char *msg) } } +static struct dri2_egl_display_vtbl droid_display_vtbl = { + .authenticate = NULL, +}; + EGLBoolean dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) { @@ -716,6 +720,11 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) droid_init_driver_functions(drv); + /* Fill vtbl last to prevent accidentally calling virtual function during + * initialization. + */ + dri2_dpy->vtbl = &droid_display_vtbl; + return EGL_TRUE; cleanup_screen: |