gpu_async_blend

Blend foreground and background to a destination frame-buffer.

static int32_t gpu_async_blend(
    struct gpu_buffer * dst,
    struct gpu_rectangle * dst_rect,
    struct gpu_buffer * fg,
    struct gpu_rectangle * fg_rect,
    struct gpu_buffer * bg,
    struct gpu_rectangle * bg_rect,
    enum gpu_blend blend
)

This function BLEND a foreground frame-buffer and a background frame-buffer to a destination frame-buffer. This function is asynchronous, application can call gpu_async_register_callback function to register a callback function. The callback function will be invoked when GPU operation finished.

Parameters

dst

Type: struct gpu_buffer *

Pointer to the destination area buffer.

dst_rect

Type: struct gpu_rectangle *

Pointer to the destination area rectangle.

fg

Type: struct gpu_buffer *

Pointer to the foreground area buffer.

fg_rect

Type: struct gpu_rectangle *

Pointer to the foreground area rectangle.

bg

Type: struct gpu_buffer *

Pointer to the background area buffer.

bg_rect

Type: struct gpu_rectangle *

Pointer to the background area rectangle.

blend

Type: enum gpu_blend

Blend function.

Returns

Type: int32_t

Operation status.

ERR_BUSY

A GPU Operation still in processing.