diff options
author | Eric Anholt <eric@anholt.net> | 2013-12-30 18:49:46 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2014-03-05 13:10:22 -0800 |
commit | fb4a1e6ef6f80a7670e92cab2bc490d4afd80a9b (patch) | |
tree | e94168b18dffb5b2dd4c567bcd508b8c17e14aed /glamor/glamor.h | |
parent | 2d20f75b60276508424997d9fa8c5b97d8f1d92b (diff) |
glamor: Rename the DRI-related pixmap functions.
There was confusion over whether they should have egl in the name, and
they had DRI3 in the name even though they're useful to have without
DRI3.
v2: Just rename glamor_name_from_pixmap for now -- I'd accidentally
conflict-resolved in adding new parameters from a later commit.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glamor/glamor.h')
-rw-r--r-- | glamor/glamor.h | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/glamor/glamor.h b/glamor/glamor.h index 89e7d80aa..041004e9d 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -173,21 +173,23 @@ extern _X_EXPORT int glamor_egl_dri3_fd_name_from_tex(ScreenPtr, PixmapPtr, unsigned int, Bool, CARD16 *, CARD32 *); -/* @glamor_is_dri3_support_enabled: Returns if DRI3 support is enabled. +/* @glamor_supports_pixmap_import_export: Returns whether + * glamor_fd_from_pixmap(), glamor_name_from_pixmap(), and + * glamor_pixmap_from_fd() are supported. * * @screen: Current screen pointer. * - * To have DRI3 support enabled, glamor and glamor_egl need to be initialized, - * and glamor_egl_init_textured_pixmap need to be called. glamor also - * has to be compiled with gbm support. - * The EGL layer need to have the following extensions working: + * To have DRI3 support enabled, glamor and glamor_egl need to be + * initialized. glamor also has to be compiled with gbm support. + * + * The EGL layer needs to have the following extensions working: + * * .EGL_KHR_gl_texture_2D_image * .EGL_EXT_image_dma_buf_import - * If DRI3 support is not enabled, the following helpers will return an error. * */ -extern _X_EXPORT Bool glamor_is_dri3_support_enabled(ScreenPtr screen); +extern _X_EXPORT Bool glamor_supports_pixmap_import_export(ScreenPtr screen); -/* @glamor_dri3_fd_from_pixmap: DRI3 helper to get a dma-buf fd from a pixmap. +/* @glamor_fd_from_pixmap: Get a dma-buf fd from a pixmap. * * @screen: Current screen pointer. * @pixmap: The pixmap from which we want the fd. @@ -198,22 +200,25 @@ extern _X_EXPORT Bool glamor_is_dri3_support_enabled(ScreenPtr screen); * content. * Returns the fd on success, -1 on error. * */ -extern _X_EXPORT int glamor_dri3_fd_from_pixmap(ScreenPtr screen, - PixmapPtr pixmap, - CARD16 *stride, CARD32 *size); +extern _X_EXPORT int glamor_fd_from_pixmap(ScreenPtr screen, + PixmapPtr pixmap, + CARD16 *stride, CARD32 *size); -/* @glamor_dri3_name_from_pixmap: helper to get an gem name from a pixmap. +/** + * @glamor_name_from_pixmap: Gets a gem name from a pixmap. * * @pixmap: The pixmap from which we want the gem name. * - * the pixmap and the buffer associated by the gem name will share the same - * content. This function can be used by the DDX to support DRI2, but needs - * glamor DRI3 support to be activated. + * the pixmap and the buffer associated by the gem name will share the + * same content. This function can be used by the DDX to support DRI2, + * and needs the same set of buffer export GL extensions as DRI3 + * support. + * * Returns the name on success, -1 on error. * */ -extern _X_EXPORT int glamor_dri3_name_from_pixmap(PixmapPtr pixmap); +extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap); -/* @glamor_egl_dri3_pixmap_from_fd: DRI3 helper to get a pixmap from a dma-buf fd. +/* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd. * * @screen: Current screen pointer. * @fd: The dma-buf fd to import. @@ -225,13 +230,13 @@ extern _X_EXPORT int glamor_dri3_name_from_pixmap(PixmapPtr pixmap); * * Returns a valid pixmap if the import succeeded, else NULL. * */ -extern _X_EXPORT PixmapPtr glamor_egl_dri3_pixmap_from_fd(ScreenPtr screen, - int fd, - CARD16 width, - CARD16 height, - CARD16 stride, - CARD8 depth, - CARD8 bpp); +extern _X_EXPORT PixmapPtr glamor_pixmap_from_fd(ScreenPtr screen, + int fd, + CARD16 width, + CARD16 height, + CARD16 stride, + CARD8 depth, + CARD8 bpp); #ifdef GLAMOR_FOR_XORG |