egl: store the native surface pointer in struct _egl_surface
[mesa.git] / src / egl / main / eglsurface.c
index 7d96514f77553e145e72ec873d8dcd0bbce7b595..22257391d5c3810871b6ea85b89ed49210eebfd3 100644 (file)
@@ -334,7 +334,8 @@ _eglParseSurfaceAttribList(_EGLSurface *surf, const EGLint *attrib_list)
  */
 EGLBoolean
 _eglInitSurface(_EGLSurface *surf, _EGLDisplay *disp, EGLint type,
-                _EGLConfig *conf, const EGLint *attrib_list)
+                _EGLConfig *conf, const EGLint *attrib_list,
+                void *native_surface)
 {
    const char *func;
    EGLint renderBuffer = EGL_BACK_BUFFER;
@@ -421,6 +422,8 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *disp, EGLint type,
       surf->Height = MIN2(surf->Height, _EGL_MAX_PBUFFER_HEIGHT);
    }
 
+   surf->NativeSurface = native_surface;
+
    return EGL_TRUE;
 }