Refactor stage 2 aggregation for antialiased lines #1145
Merged
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.
This PR refactors the second stage aggregation for antialiased lines so that the mathematical aggregation operations are passed into the line rendering functions from the
Reduction
classes, and in such a way that multiple reductions can be supported. There is no functional change from the end users point of view.This is the final set of changes required before issue #1133 can be implemented for antialiased lines on the CPU.
Implementation details
antialias_stage_2
tuple is created from the suppliedReductions
and passed into the line rendering functions. This tuple contains one item perReduction
, and each item is a 2-tuple ofAntialiasCombination
(an enum specifying the mathematical combination operator) and azero_value
which is the initial value of the aggregation (currently onlynp.nan
but will be0
for e.g._sum_zero
).