[Mesa-dev] [PATCH 08/15] egl: use EGL 1.5 types without suffixes
Marek Olšák
maraeo at gmail.com
Tue May 12 15:54:43 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
---
src/egl/drivers/dri2/egl_dri2.c | 4 ++--
src/egl/main/eglapi.c | 40 ++++++++++++++++++++--------------------
src/egl/main/eglapi.h | 4 ++--
src/egl/main/eglimage.h | 10 +++++-----
src/egl/main/eglsync.c | 4 ++--
src/egl/main/eglsync.h | 14 +++++++-------
6 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index fe5cbc8..8d2d477 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -2214,7 +2214,7 @@ dri2_egl_unref_sync(struct dri2_egl_display *dri2_dpy,
static _EGLSync *
dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
EGLenum type, const EGLint *attrib_list,
- const EGLAttribKHR *attrib_list64)
+ const EGLAttrib *attrib_list64)
{
_EGLContext *ctx = _eglGetCurrentContext();
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
@@ -2280,7 +2280,7 @@ dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
static EGLint
dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- EGLint flags, EGLTimeKHR timeout)
+ EGLint flags, EGLTime timeout)
{
_EGLContext *ctx = _eglGetCurrentContext();
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 51c2e78..9f09466 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -1335,7 +1335,7 @@ eglReleaseThread(void)
}
-EGLImageKHR EGLAPIENTRY
+EGLImage EGLAPIENTRY
eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
EGLClientBuffer buffer, const EGLint *attr_list)
{
@@ -1343,7 +1343,7 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
_EGLContext *context = _eglLookupContext(ctx, disp);
_EGLDriver *drv;
_EGLImage *img;
- EGLImageKHR ret;
+ EGLImage ret;
_EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv);
if (!disp->Extensions.KHR_image_base)
@@ -1365,7 +1365,7 @@ eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
EGLBoolean EGLAPIENTRY
-eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
+eglDestroyImageKHR(EGLDisplay dpy, EGLImage image)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img = _eglLookupImage(image, disp);
@@ -1385,15 +1385,15 @@ eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
}
-static EGLSyncKHR
+static EGLSync
_eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
- const EGLAttribKHR *attrib_list64, EGLBoolean is64)
+ const EGLAttrib *attrib_list64, EGLBoolean is64)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLContext *ctx = _eglGetCurrentContext();
_EGLDriver *drv;
_EGLSync *sync;
- EGLSyncKHR ret;
+ EGLSync ret;
_EGL_CHECK_DISPLAY(disp, EGL_NO_SYNC_KHR, drv);
@@ -1429,22 +1429,22 @@ _eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list,
}
-EGLSyncKHR EGLAPIENTRY
+EGLSync EGLAPIENTRY
eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
{
return _eglCreateSync(dpy, type, attrib_list, NULL, EGL_FALSE);
}
-EGLSyncKHR EGLAPIENTRY
-eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list)
+EGLSync EGLAPIENTRY
+eglCreateSync64KHR(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
{
return _eglCreateSync(dpy, type, NULL, attrib_list, EGL_TRUE);
}
EGLBoolean EGLAPIENTRY
-eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
+eglDestroySyncKHR(EGLDisplay dpy, EGLSync sync)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
@@ -1463,7 +1463,7 @@ eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
EGLint EGLAPIENTRY
-eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
+eglClientWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
@@ -1484,7 +1484,7 @@ eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR t
EGLint EGLAPIENTRY
-eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
+eglWaitSyncKHR(EGLDisplay dpy, EGLSync sync, EGLint flags)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
@@ -1510,7 +1510,7 @@ eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
EGLBoolean EGLAPIENTRY
-eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
+eglSignalSyncKHR(EGLDisplay dpy, EGLSync sync, EGLenum mode)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
@@ -1526,7 +1526,7 @@ eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
EGLBoolean EGLAPIENTRY
-eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
+eglGetSyncAttribKHR(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLint *value)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLSync *s = _eglLookupSync(sync, disp);
@@ -1574,13 +1574,13 @@ eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface,
#ifdef EGL_MESA_drm_image
-EGLImageKHR EGLAPIENTRY
+EGLImage EGLAPIENTRY
eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLDriver *drv;
_EGLImage *img;
- EGLImageKHR ret;
+ EGLImage ret;
_EGL_CHECK_DISPLAY(disp, EGL_NO_IMAGE_KHR, drv);
if (!disp->Extensions.MESA_drm_image)
@@ -1593,7 +1593,7 @@ eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attr_list)
}
EGLBoolean EGLAPIENTRY
-eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image,
+eglExportDRMImageMESA(EGLDisplay dpy, EGLImage image,
EGLint *name, EGLint *handle, EGLint *stride)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
@@ -1675,7 +1675,7 @@ eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer,
#ifdef EGL_WL_create_wayland_buffer_from_image
struct wl_buffer * EGLAPIENTRY
-eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image)
+eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
_EGLImage *img;
@@ -1739,7 +1739,7 @@ eglGetSyncValuesCHROMIUM(EGLDisplay display, EGLSurface surface,
#ifdef EGL_MESA_image_dma_buf_export
EGLBoolean EGLAPIENTRY
-eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image,
+eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImage image,
EGLint *fourcc, EGLint *nplanes,
EGLuint64KHR *modifiers)
{
@@ -1761,7 +1761,7 @@ eglExportDMABUFImageQueryMESA(EGLDisplay dpy, EGLImageKHR image,
}
EGLBoolean EGLAPIENTRY
-eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImageKHR image,
+eglExportDMABUFImageMESA(EGLDisplay dpy, EGLImage image,
int *fds, EGLint *strides, EGLint *offsets)
{
_EGLDisplay *disp = _eglLockDisplay(dpy);
diff --git a/src/egl/main/eglapi.h b/src/egl/main/eglapi.h
index 066a416..44f589d 100644
--- a/src/egl/main/eglapi.h
+++ b/src/egl/main/eglapi.h
@@ -86,9 +86,9 @@ typedef _EGLImage *(*CreateImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLCo
typedef EGLBoolean (*DestroyImageKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
-typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, const EGLAttribKHR *attrib_list64);
+typedef _EGLSync *(*CreateSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list, const EGLAttrib *attrib_list64);
typedef EGLBoolean (*DestroySyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
-typedef EGLint (*ClientWaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLint (*ClientWaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint flags, EGLTime timeout);
typedef EGLint (*WaitSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
typedef EGLBoolean (*SignalSyncKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLenum mode);
typedef EGLBoolean (*GetSyncAttribKHR_t)(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint attribute, EGLint *value);
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 50a87a1..8d9bd20 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -116,11 +116,11 @@ _eglPutImage(_EGLImage *img)
* Link an image to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static inline EGLImageKHR
+static inline EGLImage
_eglLinkImage(_EGLImage *img)
{
_eglLinkResource(&img->Resource, _EGL_RESOURCE_IMAGE);
- return (EGLImageKHR) img;
+ return (EGLImage) img;
}
@@ -140,7 +140,7 @@ _eglUnlinkImage(_EGLImage *img)
* Return NULL if the handle has no corresponding linked image.
*/
static inline _EGLImage *
-_eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy)
+_eglLookupImage(EGLImage image, _EGLDisplay *dpy)
{
_EGLImage *img = (_EGLImage *) image;
if (!dpy || !_eglCheckResource((void *) img, _EGL_RESOURCE_IMAGE, dpy))
@@ -152,12 +152,12 @@ _eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy)
/**
* Return the handle of a linked image, or EGL_NO_IMAGE_KHR.
*/
-static inline EGLImageKHR
+static inline EGLImage
_eglGetImageHandle(_EGLImage *img)
{
_EGLResource *res = (_EGLResource *) img;
return (res && _eglIsResourceLinked(res)) ?
- (EGLImageKHR) img : EGL_NO_IMAGE_KHR;
+ (EGLImage) img : EGL_NO_IMAGE_KHR;
}
diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c
index 8b8ab16..205cdc0 100644
--- a/src/egl/main/eglsync.c
+++ b/src/egl/main/eglsync.c
@@ -67,7 +67,7 @@ _eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list)
static EGLint
-_eglParseSyncAttribList64(_EGLSync *sync, const EGLAttribKHR *attrib_list)
+_eglParseSyncAttribList64(_EGLSync *sync, const EGLAttrib *attrib_list)
{
EGLint i, err = EGL_SUCCESS;
@@ -103,7 +103,7 @@ _eglParseSyncAttribList64(_EGLSync *sync, const EGLAttribKHR *attrib_list)
EGLBoolean
_eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
- const EGLint *attrib_list, const EGLAttribKHR *attrib_list64)
+ const EGLint *attrib_list, const EGLAttrib *attrib_list64)
{
EGLint err;
diff --git a/src/egl/main/eglsync.h b/src/egl/main/eglsync.h
index 1d2eb11..4959cf0 100644
--- a/src/egl/main/eglsync.h
+++ b/src/egl/main/eglsync.h
@@ -47,13 +47,13 @@ struct _egl_sync
EGLenum Type;
EGLenum SyncStatus;
EGLenum SyncCondition;
- EGLAttribKHR CLEvent;
+ EGLAttrib CLEvent;
};
extern EGLBoolean
_eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type,
- const EGLint *attrib_list, const EGLAttribKHR *attrib_list64);
+ const EGLint *attrib_list, const EGLAttrib *attrib_list64);
extern EGLBoolean
@@ -87,11 +87,11 @@ _eglPutSync(_EGLSync *sync)
* Link a sync to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static inline EGLSyncKHR
+static inline EGLSync
_eglLinkSync(_EGLSync *sync)
{
_eglLinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
- return (EGLSyncKHR) sync;
+ return (EGLSync) sync;
}
@@ -110,7 +110,7 @@ _eglUnlinkSync(_EGLSync *sync)
* Return NULL if the handle has no corresponding linked sync.
*/
static inline _EGLSync *
-_eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
+_eglLookupSync(EGLSync handle, _EGLDisplay *dpy)
{
_EGLSync *sync = (_EGLSync *) handle;
if (!dpy || !_eglCheckResource((void *) sync, _EGL_RESOURCE_SYNC, dpy))
@@ -122,12 +122,12 @@ _eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
/**
* Return the handle of a linked sync, or EGL_NO_SYNC_KHR.
*/
-static inline EGLSyncKHR
+static inline EGLSync
_eglGetSyncHandle(_EGLSync *sync)
{
_EGLResource *res = (_EGLResource *) sync;
return (res && _eglIsResourceLinked(res)) ?
- (EGLSyncKHR) sync : EGL_NO_SYNC_KHR;
+ (EGLSync) sync : EGL_NO_SYNC_KHR;
}
--
2.1.0
More information about the mesa-dev
mailing list