From 74680f5c4c242e97358948f58ffcf352e3fb56a6 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Mon, 21 Mar 2022 18:56:56 +0300 Subject: [PATCH] regenerated SDL_blit_auto.c. --- src/video/SDL_blit_auto.c | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/video/SDL_blit_auto.c b/src/video/SDL_blit_auto.c index 359c1bdf59522..f64511fcc82b0 100644 --- a/src/video/SDL_blit_auto.c +++ b/src/video/SDL_blit_auto.c @@ -756,7 +756,6 @@ static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info) { Uint32 pixel; const Uint32 A = 0xFF; - Uint32 R, G, B; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -776,8 +775,7 @@ static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; - pixel = (A << 24) | (R << 16) | (G << 8) | B; + pixel |= (A << 24); *dst = pixel; posx += incx; ++dst; @@ -2232,7 +2230,6 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info) { Uint32 pixel; - Uint32 R, G, B; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -2252,8 +2249,7 @@ static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; - pixel = (R << 16) | (G << 8) | B; + pixel &= 0xFFFFFF; *dst = pixel; posx += incx; ++dst; @@ -3395,7 +3391,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info) static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info) { Uint32 pixel; - Uint32 R, G, B; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -3415,8 +3410,7 @@ static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); - pixel = (R << 16) | (G << 8) | B; + pixel >>= 8; *dst = pixel; posx += incx; ++dst; @@ -4163,7 +4157,6 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info) static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info) { Uint32 pixel; - Uint32 R, G, B, A; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -4183,8 +4176,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel; - pixel = (A << 24) | (R << 16) | (G << 8) | B; + pixel = (pixel >> 8) | (pixel << 24); *dst = pixel; posx += incx; ++dst; @@ -4947,7 +4939,6 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info) { Uint32 pixel; - Uint32 R, G, B; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -4967,8 +4958,7 @@ static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; - pixel = (B << 16) | (G << 8) | R; + pixel &= 0xFFFFFF; *dst = pixel; posx += incx; ++dst; @@ -6115,7 +6105,6 @@ static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info) static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info) { Uint32 pixel; - Uint32 R, G, B; int srcy, srcx; Uint32 posy, posx; int incy, incx; @@ -6135,8 +6124,7 @@ static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info) srcx = posx >> 16; src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4)); pixel = *src; - B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); - pixel = (B << 16) | (G << 8) | R; + pixel >>= 8; *dst = pixel; posx += incx; ++dst;