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.
When I increased the size of the grid to accommodate halos that could extend outside of the default canvas size, I should have increased the size of the three working arrays to match. Instead, I made it possible for
edt1d
to index past the end of the working arrays, at which point it does a bunch of nonsense math withNaN
andundefined
and then assigns the results to non-existent array positions. At the end it doesn't actually copy any undefined values into the output grid, so the very "end" of the grid (the lower right corner of the output) is left at the "alpha 0" state it's initialized to, which happens to be correct for almost any glyph (thus we didn't notice the problem).However, on Firefox, running this code is dramatically slower. As far as I can tell, the logic is all being evaluated the same way, but since this is the innermost loop of an expensive operation, it's not surprising that small differences in handling out-of-bounds array access could have a big impact.
@mourner