Description of your driver's 2D capabilities
#include <draw.h>
typedef struct disp_2d_caps {
int size;
unsigned accel_flags;
unsigned flags;
int min_stride;
int max_stride;
int stride_gran;
} disp_2d_caps_t;
The disp_2d_caps_t structure describes a driver's 2D
capabilities.
Your driver fills it in when the graphics framework calls the
get_2d_caps()
function defined in
disp_draw_miscfuncs_t.
The disp_2d_caps_t structure includes the following members:
- size
- The size of this structure, in bytes.
- accel_flags
- Flags (defined in <draw.h>) describing which draw
operations are performed with hardware
acceleration:
- DISP_2D_ACCEL_OPAQUE_BLIT -- simple, opaque blit
operations
- DISP_2D_ACCEL_OPAQUE_FILL -- simple, opaque fill
operations
- DISP_2D_ACCEL_MONO_PAT -- simple draw operations
with two colors and a pattern
- DISP_2D_ACCEL_TRANS_PAT -- simple draw operations
with a transparency pattern
- DISP_2D_ACCEL_SIMPLE_ROPS -- copy, XOR, AND and OR
with a pattern
- DISP_2D_ACCEL_COMPLEX_ROPS -- all 256 rop3 codes
are accelerated
- DISP_2D_ACCEL_SRCALPHA_BLEND_GLOBAL -- alpha
blending with a global source factor is supported
- DISP_2D_ACCEL_SRCALPHA_BLEND_PIXEL -- alpha
blending with a per-pixel source factor is supported
- DISP_2D_ACCEL_SRCALPHA_BLEND_MAP -- alpha blending
with an alpha map as source is supported
- DISP_2D_ACCEL_DSTALPHA_BLEND_GLOBAL -- alpha
blending with a global destination factor
- DISP_2D_ACCEL_DSTALPHA_BLEND_PIXEL -- alpha
blending with a per-pixel destination factor
- DISP_2D_ACCEL_SRC_CHROMA -- source image chroma
keying is supported
- DISP_2D_ACCEL_DST_CHROMA -- destination image
chroma keying is supported
- flags
- Flags (also defined in <draw.h>) describing miscellaneous
properties of the 2D renderer:
- DISP_2D_SRC_DST_STRIDE_EQUAL -- separate source
and destination strides can't be specified
- min_stride
- The minimum stride that a 2D surface can be.
- max_stride
- The maximum stride that a 2D surface can be.
- stride_gran
- A value that the stride of the 2D surface must be a multiple of.
Photon
disp_draw_miscfuncs_t