MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
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, uint32_t hdr_size, uint32_t width, uint32_t height)
 
DrmSurfaceBuffer *(* create_buffer_from_handle )(DrmDriver *driver, uint32_t handle, size_t size)
 
DrmSurfaceBuffer *(* create_buffer_from_name )(DrmDriver *driver, uint32_t name)
 
DrmSurfaceBuffer *(* create_buffer_from_prime_fd )(DrmDriver *driver, int prime_fd, size_t size)
 
uint8_t *(* map_buffer )(DrmDriver *driver, DrmSurfaceBuffer *buffer, int for_scanout)
 
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, ColorLogicalOp 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)
 
int(* alpha_pixel_blit )(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, ColorBlendMethod blend_method)
 

Detailed Description

The structure type defines the operations for a DRM driver.

Definition at line 163 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 pixels 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 blitting with alpha.

Definition at line 307 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 pixels 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 blitting with alpha and color key.

Definition at line 332 of file exstubs.h.

◆ alpha_pixel_blit

int(* alpha_pixel_blit(DrmDriver *driver, DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc, DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc, ColorBlendMethod blend_method)

This operation blits pixels from a source buffer with the source alpha value of pixels to the destination buffer, and with the specified color compositing/blending method (ColorBlendMethod).

Note
If this operation is set as NULL, the driver does not support hardware accelerated blitting with alpha on basis per pixel.
Currently, the color compositing/blending method is ignored.

Definition at line 347 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 blitting operation.

Definition at line 284 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 273 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, ColorLogicalOp 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 blitting.
Currently, the logical operation is ignored.

Definition at line 295 of file exstubs.h.

◆ create_buffer

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

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

Note
The driver must implement this operation and fill all fields of the new DrmSurfaceBuffer object.

Definition at line 195 of file exstubs.h.

◆ create_buffer_from_handle

DrmSurfaceBuffer*(* create_buffer_from_handle(DrmDriver *driver, uint32_t handle, size_t size)

This operation creates a buffer from a given and possibly foreign handle with the size of the buffer. If succeed, a valid DrmSurfaceBuffer object will be returned; NULL on error.

Note
This operation can be NULL. Note that the handle might was created by a foreign module. If implemented, the driver must fill the correct prime_fd, handle, name, and size fields of the new DrmSurfaceBuffer object.

Definition at line 209 of file exstubs.h.

◆ create_buffer_from_name

DrmSurfaceBuffer*(* create_buffer_from_name(DrmDriver *driver, uint32_t name)

This operation creates a buffer for the given system global name If succeed, a valid DrmSurfaceBuffer object will be returned; NULL on error.

Note
This operation can be NULL. If implemented, the driver must fill the correct prime_fd, handle, name, and size fields of the new DrmSurfaceBuffer object.

Definition at line 221 of file exstubs.h.

◆ create_buffer_from_prime_fd

DrmSurfaceBuffer*(* create_buffer_from_prime_fd(DrmDriver *driver, int prime_fd, size_t size)

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. If implemented, the driver must fill the correct prime_fd, handle, name, and size fields of the new DrmSurfaceBuffer object.

Definition at line 233 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 169 of file exstubs.h.

◆ destroy_buffer

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

This operation destroys a buffer.

Note
The driver must implement this operation.

Definition at line 264 of file exstubs.h.

◆ destroy_driver

void(* destroy_driver(DrmDriver *driver)

This operation destroys the DrmDriver object.

Note
The driver must implement this operation.

Definition at line 176 of file exstubs.h.

◆ flush_driver

void(* flush_driver(DrmDriver *driver)

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

Note
This operation can be NULL.

Definition at line 184 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 pixels 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 blitting with color key.

Definition at line 319 of file exstubs.h.

◆ map_buffer

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

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

When for_scanout is not zero, the buffer will be used for scan out frame buffer.

Note
The driver must implement this operation. The driver must set a valid value for buff field of the DrmSurfaceBuffer object on success.

Definition at line 247 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. The driver must set NULL for buff field of the DrmSurfaceBuffer object on success.

Definition at line 257 of file exstubs.h.


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