diff options
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/egl/egl_surface.c | 21 | ||||
-rw-r--r-- | src/gallium/state_trackers/egl/egl_tracker.c | 4 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/egl_surface.c b/src/gallium/state_trackers/egl/egl_surface.c index a4493e2637..91615abebe 100644 --- a/src/gallium/state_trackers/egl/egl_surface.c +++ b/src/gallium/state_trackers/egl/egl_surface.c @@ -186,6 +186,9 @@ drm_takedown_shown_screen(_EGLDisplay *dpy, struct drm_screen *screen) screen->shown = 0; } +/** + * Called by libEGL's eglCreateWindowSurface(). + */ _EGLSurface * drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, NativeWindowType window, const EGLint *attrib_list) { @@ -193,6 +196,9 @@ drm_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, N } +/** + * Called by libEGL's eglCreatePixmapSurface(). + */ _EGLSurface * drm_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, NativePixmapType pixmap, const EGLint *attrib_list) { @@ -200,6 +206,9 @@ drm_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, N } +/** + * Called by libEGL's eglCreatePbufferSurface(). + */ _EGLSurface * drm_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, const EGLint *attrib_list) @@ -254,6 +263,9 @@ err: return NULL; } +/** + * Called by libEGL's eglCreateScreenSurfaceMESA(). + */ _EGLSurface * drm_create_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *cfg, const EGLint *attrib_list) @@ -263,6 +275,9 @@ drm_create_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *cf return surf; } +/** + * Called by libEGL's eglShowScreenSurfaceMESA(). + */ EGLBoolean drm_show_screen_surface_mesa(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *screen, @@ -359,6 +374,9 @@ err_tex: return EGL_FALSE; } +/** + * Called by libEGL's eglDestroySurface(). + */ EGLBoolean drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface) { @@ -372,6 +390,9 @@ drm_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface) return EGL_TRUE; } +/** + * Called by libEGL's eglSwapBuffers(). + */ EGLBoolean drm_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw) { diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c index 8d29bf490b..5811c20f03 100644 --- a/src/gallium/state_trackers/egl/egl_tracker.c +++ b/src/gallium/state_trackers/egl/egl_tracker.c @@ -22,6 +22,8 @@ void* driDriverAPI; * Exported functions */ +/** Called by libEGL just prior to unloading/closing the driver. + */ static void drm_unload(_EGLDriver *drv) { @@ -31,6 +33,8 @@ drm_unload(_EGLDriver *drv) /** * The bootstrap function. Return a new drm_driver object and * plug in API functions. + * libEGL finds this function with dlopen()/dlsym() and calls it from + * "load driver" function. */ _EGLDriver * _eglMain(const char *args) |