... | ... | @@ -92,7 +92,9 @@ for your GPU externally. |
|
|
|
|
|
First, you need to implement the following external stub:
|
|
|
|
|
|
DriDriverOps* __dri_ex_driver_get (const char* driver_name);
|
|
|
```C
|
|
|
DriDriverOps* __dri_ex_driver_get (const char* driver_name);
|
|
|
```
|
|
|
|
|
|
This function takes an argument `driver_name` and returns NULL or
|
|
|
a valid pointer of `DriDriverOps` to MiniGUI. The argument `driver_name`
|
... | ... | @@ -108,10 +110,11 @@ instead. |
|
|
The `DriDriverOps` is a struct type consisted by a set of operators
|
|
|
(callbacks):
|
|
|
|
|
|
/**
|
|
|
```C
|
|
|
/**
|
|
|
* The struct type defines the operators for a DRI driver.
|
|
|
*/
|
|
|
typedef struct _DriDriverOps {
|
|
|
typedef struct _DriDriverOps {
|
|
|
/**
|
|
|
* This operator creates the DriDriver object.
|
|
|
*
|
... | ... | @@ -240,7 +243,8 @@ The `DriDriverOps` is a struct type consisted by a set of operators |
|
|
DriSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
|
|
uint8_t alpha, uint32_t color_key);
|
|
|
|
|
|
} DriDriverOps;
|
|
|
} DriDriverOps;
|
|
|
```
|
|
|
|
|
|
If the external stub `__dri_ex_driver_get` returns a valid pointer
|
|
|
of `DriDriverOps`, MiniGUI will call the operator `create_driver`
|
... | ... | @@ -251,12 +255,14 @@ need this pointer as the context of your DRI driver. |
|
|
Note that MiniGUI does not defined the detailed structure of
|
|
|
`DriDriver`, it is up to your implementation:
|
|
|
|
|
|
/**
|
|
|
```C
|
|
|
/**
|
|
|
* The struct type represents the DRI sub driver.
|
|
|
* The concrete struct should be defined by the driver.
|
|
|
*/
|
|
|
struct _DriDriver;
|
|
|
typedef struct _DriDriver DriDriver;
|
|
|
struct _DriDriver;
|
|
|
typedef struct _DriDriver DriDriver;
|
|
|
```
|
|
|
|
|
|
For other operators, please see the comments above.
|
|
|
|
... | ... | |