Fixed linear_gradient and radial_gradient I and F modes#5274
Merged
wiredfool merged 1 commit intopython-pillow:masterfrom Mar 28, 2021
Merged
Fixed linear_gradient and radial_gradient I and F modes#5274wiredfool merged 1 commit intopython-pillow:masterfrom
wiredfool merged 1 commit intopython-pillow:masterfrom
Conversation
hugovk
reviewed
Mar 7, 2021
| int x; | ||
| for (y = 0; y < 256; y++) { | ||
| for (x = 0; x < 256; x++) { | ||
| if (im->type == IMAGING_TYPE_FLOAT32) { |
Member
There was a problem hiding this comment.
Does refactoring this check outside the 256 * 256 loop make any sort of performance difference?
Member
There was a problem hiding this comment.
Branch prediction should be bang on for this one. And I'd even expect that the compiler would hoist this.
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.
Resolves #5272
Image.linear_gradient("I"),Image.linear_gradient("F"),Image.radial_gradient("I")andImage.radial_gradient("F")all currently segfault. This fixes them.