Add SDL_memset2 and use it for line drawing and fill routines#15680
Open
ccawley2011 wants to merge 1 commit into
Open
Add SDL_memset2 and use it for line drawing and fill routines#15680ccawley2011 wants to merge 1 commit into
ccawley2011 wants to merge 1 commit into
Conversation
ccawley2011
commented
May 24, 2026
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").
slouken
reviewed
May 24, 2026
| Uint8 *pixels; | ||
| if (x1 <= x2) { | ||
| pixels = (Uint8 *)dst->pixels + y1 * pitch + x1; | ||
| pixels = (Uint8 *)dst->pixels + y1 * dst->pitch + x1 * sizeof(Uint8); |
Collaborator
There was a problem hiding this comment.
This seems redundant, did you mean to add this?
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.