From: Brian Paul Date: Mon, 16 May 2005 00:31:29 +0000 (+0000) Subject: minor tweaks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b134f641c3a2ee8d12e6b2a205e9fe6ff2cf401;p=mesa.git minor tweaks --- diff --git a/src/egl/main/eglmode.c b/src/egl/main/eglmode.c index 26ea6bd6054..f2b17a6d270 100644 --- a/src/egl/main/eglmode.c +++ b/src/egl/main/eglmode.c @@ -56,7 +56,7 @@ _eglLookupMode(EGLDisplay dpy, EGLModeMESA mode) */ _EGLMode * _eglAddMode(_EGLScreen *screen, EGLint width, EGLint height, - EGLint refreshRate, char *name) + EGLint refreshRate, const char *name) { EGLint n; _EGLMode *newModes; diff --git a/src/egl/main/eglmode.h b/src/egl/main/eglmode.h index 71adef42ed4..ed2f022d054 100644 --- a/src/egl/main/eglmode.h +++ b/src/egl/main/eglmode.h @@ -13,7 +13,7 @@ struct _egl_mode EGLint Width, Height; /* size in pixels */ EGLint RefreshRate; /* rate * 1000.0 */ EGLBoolean Stereo; - char *Name; + const char *Name; /* Other possible attributes */ /* interlaced */ @@ -27,7 +27,7 @@ _eglLookupMode(EGLDisplay dpy, EGLModeMESA mode); extern _EGLMode * _eglAddMode(_EGLScreen *screen, EGLint width, EGLint height, - EGLint refreshRate, char *name); + EGLint refreshRate, const char *name); extern EGLBoolean diff --git a/src/egl/main/eglscreen.c b/src/egl/main/eglscreen.c index 406ad1b4fde..9669a22c07e 100644 --- a/src/egl/main/eglscreen.c +++ b/src/egl/main/eglscreen.c @@ -24,7 +24,7 @@ /** - * Return a new _EGLScreen object. + * Initialize an _EGLScreen object to default values. */ void _eglInitScreen(_EGLScreen *screen) @@ -105,9 +105,13 @@ _eglGetScreensMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA *screens, } +/** + * Initialize the given _EGLSurface object. Assign it an EGLSurface handle. + * Return the EGLSurface handle or EGL_BAD_SURFACE if error. + */ EGLSurface -_eglInitScreenSurfaceMESA(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list) +_eglInitScreenSurface(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, + EGLConfig config, const EGLint *attrib_list) { EGLint width = 0, height = 0; EGLint i; @@ -157,7 +161,7 @@ _eglCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, EGLSurface surface; surf = (_EGLSurface *) malloc(sizeof(_EGLSurface)); - surface = _eglInitScreenSurfaceMESA(surf, drv, dpy, config, attrib_list); + surface = _eglInitScreenSurface(surf, drv, dpy, config, attrib_list); if (surface == EGL_NO_SURFACE) free(surf); diff --git a/src/egl/main/eglscreen.h b/src/egl/main/eglscreen.h index 1dff069f746..afc52a5ecb7 100644 --- a/src/egl/main/eglscreen.h +++ b/src/egl/main/eglscreen.h @@ -36,8 +36,8 @@ _eglGetScreensMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA *screens, EGLi extern EGLSurface -_eglInitScreenSurfaceMESA(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list); +_eglInitScreenSurface(_EGLSurface *surf, _EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); + extern EGLSurface _eglCreateScreenSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list);