Skip to content

Commit

Permalink
removed pitch safeguards
Browse files Browse the repository at this point in the history
  • Loading branch information
itzpr3d4t0r committed Sep 10, 2023
1 parent 0b393ae commit b4d6d7d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src_c/surface_fill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b4d6d7d

Please sign in to comment.