Round join tessellation and CPU edge accuracy - #417
Merged
Conversation
…PU edge accuracy - CalcArc and stroke_calc_arc take their vertex count from the guarded GetArcSubdivisionCount and stroke_arc_subdivision_count used by round caps. - StrokeOptions.ArcDetailScale rejects values not greater than zero. - DefaultRasterizer: band boundary X is interpolated from the segment endpoint and rounded to nearest, coverage uses the exact doubled area, and the DDA walkers round row and column boundaries to nearest. - Tests: ArcDetailScale validation, subdivision count monotonicity, and CPU/GPU parity theories for round joins at scales 0.01 to 16. - Reference images updated for the corrected edge coverage.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/3.1.x #417 +/- ##
=============================================
Coverage 79% 79%
=============================================
Files 232 232
Lines 27356 27359 +3
Branches 3113 3114 +1
=============================================
+ Hits 21875 21879 +4
+ Misses 4589 4587 -2
- Partials 892 893 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Prerequisites
Description
Round joins in both backends computed their arc step with an unguarded expression, while round caps used a guarded one. A zero or negative
ArcDetailScaleturned round joins into bevels on the CPU and gave the GPU an undefined vertex count. Joins now share the cap helper, andStrokeOptions.ArcDetailScalerejects values that are not greater than zero.Parity tests at non-default scales exposed three CPU rasterizer errors on antialiased edges. Band boundary X accumulated truncation across 16 row bands, so long slanted edges drifted by up to a few hundredths of a pixel. Coverage was quantized to 1/256 steps before the blend. The DDA walkers floored every row and column boundary. All three are fixed, and CPU and GPU output now agree to the precision of the CPU's 24.8 fixed point geometry.
Reference images are updated for the corrected edge coverage.