MiniGUI API Reference (MiniGUI-Processes)  v4.0.4
A mature and proven cross-platform GUI system for embedded and smart IoT devices
Data Fields
_DrmDriverOps Struct Reference

#include <exstubs.h>

Data Fields

DrmDriver *(* create_driver )(int device_fd)
 
void(* destroy_driver )(DrmDriver *driver)
 
void(* flush_driver )(DrmDriver *driver)
 
DrmSurfaceBuffer *(* create_buffer )(DrmDriver *driver, uint32_t drm_format, unsigned int width, unsigned int height)
 
DrmSurfaceBuffer *(* create_buffer_from_handle )(DrmDriver *driver, uint32_t handle, unsigned long size, uint32_t drm_format, unsigned int width, unsigned int height, unsigned int pitch)
 
DrmSurfaceBuffer *(* create_buffer_from_name )(DrmDriver *driver, uint32_t name, uint32_t drm_format, unsigned int width, unsigned int height, unsigned int pitch)
 
DrmSurfaceBuffer *(* create_buffer_from_prime_fd )(DrmDriver *driver, int prime_fd, unsigned long size, uint32_t drm_format, unsigned int width, unsigned int height, unsigned int pitch)
 
uint8_t *(* map_buffer )(DrmDriver *driver, DrmSurfaceBuffer *buffer)
 
void(* unmap_buffer )(DrmDriver *driver, DrmSurfaceBuffer *buffer)
 
void(* destroy_buffer )(DrmDriver *driver, DrmSurfaceBuffer *buffer)
 
int(* clear_buffer )(DrmDriver *driver, DrmSurfaceBuffer *dst_buf, const GAL_Rect *rc, uint32_t pixel_value)
 
int(* check_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, DrmSurfaceBuffer *dst_buf)
 
int(* copy_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, enum DrmColorLogicOp logic_op)
 
int(* alpha_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint8_t alpha)
 
int(* key_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint32_t color_key)
 
int(* alpha_key_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint8_t alpha, uint32_t color_key)
 

Detailed Description

The struct type defines the operations for a DRI driver.

Definition at line 154 of file exstubs.h.

Field Documentation

◆ alpha_blit

int(* alpha_blit) (DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint8_t alpha)

This operation blits pixles from a source buffer with the source alpha value specified to a destination buffer.

Note
If this operation is set as NULL, the driver does not support hardware accelerated blit with alpha.

Definition at line 282 of file exstubs.h.

◆ alpha_key_blit

int(* alpha_key_blit) (DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint8_t alpha, uint32_t color_key)

This operation blits pixles from a source buffer with the source alpha value specified to a destination buffer, but skipping the pixel value specified.

Note
If this operation is set as NULL, the driver does not support hardware accelerated blit with alpha and color key.

Definition at line 304 of file exstubs.h.

◆ check_blit

int(* check_blit) (DrmDriver *driver, DrmSurfaceBuffer *src_buf, DrmSurfaceBuffer *dst_buf)

This operation checks whether a hardware accelerated blit can be done between the source buffer and the destination buffer. If succeed, it returns 0.

Note
If this operation is set as NULL, it will be supposed that the driver does not support any hardware accelerated blit operation.

Definition at line 261 of file exstubs.h.

◆ clear_buffer

int(* clear_buffer) (DrmDriver *driver, DrmSurfaceBuffer *dst_buf, const GAL_Rect *rc, uint32_t pixel_value)

This operation clears the specific rectangle area of a buffer with the specific pixel value. If succeed, it returns 0.

Note
If this operation is set as NULL, the driver does not support hardware accelerated clear operation.

Definition at line 250 of file exstubs.h.

◆ copy_blit

int(* copy_blit) (DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, enum DrmColorLogicOp logic_op)

This operation copies bits from a source buffer to a destination buffer.

Note
If this operation is set as NULL, the driver does not support hardware accelerated copy blit.

Definition at line 270 of file exstubs.h.

◆ create_buffer

DrmSurfaceBuffer*(* create_buffer) (DrmDriver *driver, uint32_t drm_format, unsigned int width, unsigned int height)

This operation creates a buffer with the specified pixel format, width, and height. If succeed, a valid DrmSurfaceBuffer object will be returned; NULL on error. Note that the field of pixels of the DrmSurfaceBuffer object is NULL until the map_buffer was called.

Note
The driver must implement this operation.

Definition at line 184 of file exstubs.h.

◆ create_buffer_from_handle

DrmSurfaceBuffer*(* create_buffer_from_handle) (DrmDriver *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 handle with the specified pixel format, width, and height. If succeed, a valid DrmSurfaceBuffer object will be returned; NULL on error.

Note
This operation can be NULL.

Definition at line 195 of file exstubs.h.

◆ create_buffer_from_name

DrmSurfaceBuffer*(* create_buffer_from_name) (DrmDriver *driver, uint32_t name, 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, a valid DrmSurfaceBuffer object will be returned; NULL on error.

Note
This operation can be NULL.

Definition at line 206 of file exstubs.h.

◆ create_buffer_from_prime_fd

DrmSurfaceBuffer*(* create_buffer_from_prime_fd) (DrmDriver *driver, int prime_fd, unsigned long size, uint32_t drm_format, unsigned int width, unsigned int height, unsigned int pitch)

This operation creates a buffer for the given PRIME file descriptor with the specified pixel format, width, height, and pitch. If succeed, a valid DrmSurfaceBuffer object will be returned; NULL on error.

Note
This operation can be NULL.

Definition at line 217 of file exstubs.h.

◆ create_driver

DrmDriver*(* create_driver) (int device_fd)

This operation creates the DrmDriver object.

Note
The driver must implement this operation.

Definition at line 160 of file exstubs.h.

◆ destroy_buffer

void(* destroy_buffer) (DrmDriver *driver, DrmSurfaceBuffer *buffer)

This operation destroies a buffer.

Note
The driver must implement this operation.

Definition at line 241 of file exstubs.h.

◆ destroy_driver

void(* destroy_driver) (DrmDriver *driver)

This operation destroies the DrmDriver object.

Note
The driver must implement this operation.

Definition at line 167 of file exstubs.h.

◆ flush_driver

void(* flush_driver) (DrmDriver *driver)

This operation flushs the batch buffer of the driver or the hardware cache.

Note
This operation can be NULL.

Definition at line 174 of file exstubs.h.

◆ key_blit

int(* key_blit) (DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, uint32_t color_key)

This operation blits pixles from a source buffer to a destination buffer, but skipping the pixel value specified by color_key.

Note
If this operation is set as NULL, the driver does not support hardware accelerated blit with color key.

Definition at line 293 of file exstubs.h.

◆ map_buffer

uint8_t*(* map_buffer) (DrmDriver *driver, DrmSurfaceBuffer *buffer)

This operation maps the buffer into the current process's virtual memory space, and returns the virtual address. If failed, it returns NULL.

Note
The driver must implement this operation.

Definition at line 227 of file exstubs.h.

◆ unmap_buffer

void(* unmap_buffer) (DrmDriver *driver, DrmSurfaceBuffer *buffer)

This operation un-maps a buffer.

Note
The driver must implement this operation.

Definition at line 234 of file exstubs.h.


The documentation for this struct was generated from the following file: