This commit is contained in:
Vincent Wei
2023-07-22 20:27:52 +08:00
parent 6be4b719c8
commit 6422cb8568
2 changed files with 6 additions and 10 deletions

View File

@@ -179,13 +179,12 @@ typedef enum {
typedef enum {
BLIT_COLORKEY_NONE = 0,
BLIT_COLORKEY_NORMAL,
BLIT_COLORKEY_INVERT,
BLIT_COLORKEY_INVERTED,
} BlitKeyOperation;
typedef enum {
BLIT_ALPHA_NONE = 0,
BLIT_ALPHA_BYTE,
BLIT_ALPHA_FLOAT,
BLIT_ALPHA_SET,
} BlitAlphaOperation;
typedef struct _DrmBlitOperations {
@@ -197,10 +196,7 @@ typedef struct _DrmBlitOperations {
ScalingFilter scl;
uint32_t key_min, key_max;
union {
uint8_t alpha_byte;
double alpha_float;
};
uint8_t alpha;
} DrmBlitOperations;
typedef int (*CB_DRM_BLIT) (DrmDriver *driver,

View File

@@ -3604,8 +3604,8 @@ static int DRM_HWBlit(GAL_Surface *src, GAL_Rect *src_rc,
}
if ((src->flags & GAL_SRCALPHA) == GAL_SRCALPHA) {
blit_ops.alf = BLIT_ALPHA_BYTE;
blit_ops.alpha_byte = src->format->alpha;
blit_ops.alf = BLIT_ALPHA_SET;
blit_ops.alpha = src->format->alpha;
}
if ((src->flags & GAL_SRCPIXELALPHA) == GAL_SRCPIXELALPHA) {
@@ -3641,7 +3641,7 @@ static int DRM_CheckHWBlit_Accl(_THIS, GAL_Surface *src, const GAL_Rect *srcrc,
}
if ((src->flags & GAL_SRCALPHA) == GAL_SRCALPHA) {
blit_ops.alf = BLIT_ALPHA_BYTE;
blit_ops.alf = BLIT_ALPHA_SET;
}
if (srcrc->w != dstrc->w || srcrc->h != dstrc->h) {