Skip to content

Add SDL_memset2 and use it for line drawing and fill routines#15680

Open
ccawley2011 wants to merge 1 commit into
libsdl-org:mainfrom
ccawley2011:memset2
Open

Add SDL_memset2 and use it for line drawing and fill routines#15680
ccawley2011 wants to merge 1 commit into
libsdl-org:mainfrom
ccawley2011:memset2

Conversation

@ccawley2011

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Uint8 *pixels;
if (x1 <= x2) {
pixels = (Uint8 *)dst->pixels + y1 * pitch + x1;
pixels = (Uint8 *)dst->pixels + y1 * dst->pitch + x1 * sizeof(Uint8);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems redundant, did you mean to add this?

@slouken

slouken commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Have you done benchmarks to find out if this is a real improvement? If so, can you please share them along with the platform, CPU, and optimization settings?

@slouken slouken added this to the 3.6.0 milestone Jun 4, 2026
@slouken slouken modified the milestones: 3.6.0, 3.x Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants