-/**
- * Create a drawing surface which can be directly displayed on a screen.
- */
-EGLSurface
-_eglCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
- const EGLint *attrib_list)
-{
- _EGLSurface *surf;
- EGLSurface surface;
-
- surf = (_EGLSurface *) malloc(sizeof(_EGLSurface));
- surface = _eglInitScreenSurface(surf, drv, dpy, config, attrib_list);
- if (surface == EGL_NO_SURFACE)
+ if (!_eglInitSurface(drv, surf, EGL_SCREEN_BIT_MESA,
+ conf, attrib_list)) {