Commit 1b8f16d8 authored by Eric Anholt's avatar Eric Anholt

glamor: Use real types for glamor_egl's public gbm functions.

I think void * was just used to avoid needing to #include gbm.h, but
we can just forward-declare the structs and be fine.
Signed-off-by: 's avatarEric Anholt <eric@anholt.net>
Reviewed-by: 's avatarMichel Dänzer <michel.daenzer@amd.com>
parent f80758f3
......@@ -40,6 +40,8 @@
#endif
struct glamor_context;
struct gbm_bo;
struct gbm_device;
/*
* glamor_pixmap_type : glamor pixmap's type.
......@@ -147,7 +149,7 @@ extern _X_EXPORT int glamor_egl_dri3_fd_name_from_tex(ScreenPtr, PixmapPtr,
unsigned int, Bool,
CARD16 *, CARD32 *);
extern _X_EXPORT void *glamor_egl_get_gbm_device(ScreenPtr screen);
extern _X_EXPORT struct gbm_device *glamor_egl_get_gbm_device(ScreenPtr screen);
/* @glamor_supports_pixmap_import_export: Returns whether
* glamor_fd_from_pixmap(), glamor_name_from_pixmap(), and
......@@ -207,8 +209,8 @@ extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap,
*
* Returns the gbm_bo on success, NULL on error.
* */
extern _X_EXPORT void *glamor_gbm_bo_from_pixmap(ScreenPtr screen,
PixmapPtr pixmap);
extern _X_EXPORT struct gbm_bo *glamor_gbm_bo_from_pixmap(ScreenPtr screen,
PixmapPtr pixmap);
/* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd.
*
......@@ -315,7 +317,8 @@ extern _X_EXPORT Bool glamor_egl_create_textured_pixmap(PixmapPtr pixmap,
* This function is similar to glamor_egl_create_textured_pixmap.
*/
extern _X_EXPORT Bool
glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap, void *bo);
glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
struct gbm_bo *bo);
#endif
......
......@@ -175,7 +175,7 @@ glamor_create_texture_from_image(ScreenPtr screen,
return TRUE;
}
void *
struct gbm_device *
glamor_egl_get_gbm_device(ScreenPtr screen)
{
#ifdef GLAMOR_HAS_GBM
......@@ -335,7 +335,8 @@ glamor_egl_create_textured_pixmap(PixmapPtr pixmap, int handle, int stride)
}
Bool
glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap, void *bo)
glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
struct gbm_bo *bo)
{
ScreenPtr screen = pixmap->drawable.pScreen;
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
......@@ -428,7 +429,7 @@ _get_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, unsigned int tex)
}
#endif
void *
struct gbm_bo *
glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap)
{
#ifdef GLAMOR_HAS_GBM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment