mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 20:45:36 +08:00
add new operation do_blit in DrmDriverOps; use do_blit instead of returning callback of check_blit
This commit is contained in:
+12
-6
@@ -177,10 +177,6 @@ typedef struct _DrmBlitOperations {
|
||||
uint8_t alpha;
|
||||
} DrmBlitOperations;
|
||||
|
||||
typedef int (*CB_DRM_BLIT) (DrmDriver *driver,
|
||||
DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc,
|
||||
DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc,
|
||||
const DrmBlitOperations *blit_ops);
|
||||
/**
|
||||
* The structure type defines the operations for a userland DRM driver.
|
||||
*/
|
||||
@@ -302,16 +298,26 @@ typedef struct _DrmDriverOps {
|
||||
/**
|
||||
* This operation checks whether a specified hardware accelerated blit
|
||||
* can be done between the source buffer and the destination buffer.
|
||||
* If succeed, it returns a callback for the specified blit operations.
|
||||
* If succeed, it returns zero, otherwise for failure.
|
||||
* If succeed, it is safe to call do_blit operation.
|
||||
*
|
||||
* \note If this operation is set as NULL, it will be supposed that
|
||||
* the driver does not support any hardware accelerated blitting operation.
|
||||
*/
|
||||
CB_DRM_BLIT (* check_blit) (DrmDriver *driver,
|
||||
int (* check_blit) (DrmDriver *driver,
|
||||
DrmSurfaceBuffer* src_buf, const GAL_Rect* src_rc,
|
||||
DrmSurfaceBuffer* dst_buf, const GAL_Rect* dst_rc,
|
||||
const DrmBlitOperations *ops);
|
||||
|
||||
/**
|
||||
* This operation does the real blit. It should not be NULL if check_blit
|
||||
* is not NULL.
|
||||
*/
|
||||
int (* do_blit) (DrmDriver *driver,
|
||||
DrmSurfaceBuffer *src_buf, const GAL_Rect *src_rc,
|
||||
DrmSurfaceBuffer *dst_buf, const GAL_Rect *dst_rc,
|
||||
const DrmBlitOperations *blit_ops);
|
||||
|
||||
/**
|
||||
* This operation copies the pixels from the source buffer to
|
||||
* the destination buffer, with or without scaling, rotation, and flip.
|
||||
|
||||
Reference in New Issue
Block a user