mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 02:01:50 +08:00
tune interface of create_buffer_from_name; add DRI driver method create_buffer_from_handle
This commit is contained in:
@@ -110,9 +110,11 @@ typedef struct _DriSurfaceBuffer {
|
||||
uint32_t drm_format;
|
||||
|
||||
/** The bits per pixel */
|
||||
uint16_t bpp:8;
|
||||
uint32_t bpp:8;
|
||||
/** The bytes per pixel */
|
||||
uint16_t cpp:8;
|
||||
uint32_t cpp:8;
|
||||
/** Is foreign surface */
|
||||
uint32_t foreign:1;
|
||||
|
||||
/** The whole size in bytes of the buffer */
|
||||
unsigned long size;
|
||||
@@ -179,6 +181,17 @@ typedef struct _DriDriverOps {
|
||||
uint32_t drm_format,
|
||||
unsigned int width, unsigned int height);
|
||||
|
||||
/**
|
||||
* This operation creates a buffer for the given handle
|
||||
* with the specified pixel format, width, and height. If succeed,
|
||||
* a valid DriSurfaceBuffer object will be returned; NULL on error.
|
||||
*
|
||||
* \note The driver must implement this operation.
|
||||
*/
|
||||
DriSurfaceBuffer* (* create_buffer_from_handle) (DriDriver *driver,
|
||||
uint32_t handle, unsigned long size, uint32_t drm_format,
|
||||
unsigned int width, unsigned int height, unsigned int pitch);
|
||||
|
||||
/**
|
||||
* This operation creates a buffer for the given system global name
|
||||
* with the specified pixel format, width, and height. If succeed,
|
||||
@@ -188,7 +201,7 @@ typedef struct _DriDriverOps {
|
||||
*/
|
||||
DriSurfaceBuffer* (* create_buffer_from_name) (DriDriver *driver,
|
||||
uint32_t name, uint32_t drm_format,
|
||||
unsigned int width, unsigned int height);
|
||||
unsigned int width, unsigned int height, unsigned int pitch);
|
||||
|
||||
/**
|
||||
* This operation maps the buffer into the current process's virtual memory
|
||||
|
||||
Reference in New Issue
Block a user