Some more documentation for in the rasterizer#182
Open
nical wants to merge 1 commit intojrmuizel:masterfrom
Open
Some more documentation for in the rasterizer#182nical wants to merge 1 commit intojrmuizel:masterfrom
nical wants to merge 1 commit intojrmuizel:masterfrom
Conversation
nical
commented
Mar 30, 2022
| let B = 2 * (edge.control_y - edge.y1); | ||
| //C = edge.y1; | ||
| e.dy = 2 * (A >> shift) + 2 * B * (1 << (16 - SAMPLE_SHIFT)); | ||
| e.dy = 2 * (A >> shift) + dot2_to_dot16(B); |
Contributor
Author
There was a problem hiding this comment.
Note: the skia equivalent looks simpler: https://github.com/RazrFalcon/tiny-skia/blob/afa3172310bb7a30e44911ef825f06dd900a4d85/src/edge.rs#L234 (note the comment above about preserving a bit by not multiplying by two and compensating in the curve shift).
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.
Some of it requires a bit more attention than the previous PR.
foo * (1 << (16 - SAMPLE_SHIFT)got reformulated asdot2_to_dot16(foo). I didn't do it initially because I wasn't sure whether the doingfoo * 1 << barinstead of simplyfoo << barwas indicative of something that I had missed but I think it makes better sense in the new formulation.tanywhere. This comment had me puzzled for a while, if it indeed conveys something meaningful I think it needs to be rephrased.