From b4d6d7d43d0b73e6cd4494160f30b30a4fbb9382 Mon Sep 17 00:00:00 2001 From: itzpr3d4t0r <103119829+itzpr3d4t0r@users.noreply.github.com> Date: Sun, 10 Sep 2023 12:16:14 +0200 Subject: [PATCH] removed pitch safeguards --- src_c/surface_fill.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src_c/surface_fill.c b/src_c/surface_fill.c index e48d031893..6758daefe6 100644 --- a/src_c/surface_fill.c +++ b/src_c/surface_fill.c @@ -869,9 +869,7 @@ surface_fill_blend(SDL_Surface *surface, SDL_Rect *rect, Uint32 color, case PYGAME_BLEND_ADD: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN - if (surface->format->BytesPerPixel == 4 && - (surface->pitch % surface->format->BytesPerPixel == 0) && - _pg_has_avx2()) { + if (surface->format->BytesPerPixel == 4 && _pg_has_avx2()) { result = surface_fill_blend_add_avx2(surface, rect, color); break; } @@ -900,9 +898,7 @@ surface_fill_blend(SDL_Surface *surface, SDL_Rect *rect, Uint32 color, case PYGAME_BLEND_RGBA_ADD: { #if !defined(__EMSCRIPTEN__) #if SDL_BYTEORDER == SDL_LIL_ENDIAN - if (surface->format->BytesPerPixel == 4 && - (surface->pitch % surface->format->BytesPerPixel == 0) && - _pg_has_avx2()) { + if (surface->format->BytesPerPixel == 4 && _pg_has_avx2()) { result = surface_fill_blend_rgba_add_avx2(surface, rect, color); break;