Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRefactor CanvasRenderingContext2D.arc() and .ellipse() #25801
Conversation
|
These changes already fix some tests, but I'm trying to squeeze a few more passes out of it. So this is still WIP. |
|
There are still some tests, I'd like to take a look at:
That's all there is left related to |
|
These tests depend on jrmuizel/raqote#96 being fixed:
This leaves only these two tests for now:
I'll make those pass and then I would leave it at that for this PR. |
|
@bors-servo try=wpt |
Refactor CanvasRenderingContext2D.arc() and .ellipse() <!-- Please describe your changes on the following line: --> Refactor `arc()` and `ellipse()` to make use of `lyon_geom::Arc` for approximating an arc with quadratic bezier curves. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #25331 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
@jdm, when all tests pass and you've approved the changes, I'd like to sqash the commits before this will be merged. |
|
@bors-servo try=wpt |
Refactor CanvasRenderingContext2D.arc() and .ellipse() <!-- Please describe your changes on the following line: --> Refactor `arc()` and `ellipse()` to make use of `lyon_geom::Arc` for approximating an arc with quadratic bezier curves. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #25331 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
|
I'm not exactly sure what happened with these tests, yet. Although they make use of |
|
|
|
@bors-servo try=wpt |
Refactor CanvasRenderingContext2D.arc() and .ellipse() <!-- Please describe your changes on the following line: --> Refactor `arc()` and `ellipse()` to make use of `lyon_geom::Arc` for approximating an arc with quadratic bezier curves. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #25331 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
@bors-servo try=wpt |
Refactor CanvasRenderingContext2D.arc() and .ellipse() <!-- Please describe your changes on the following line: --> Refactor `arc()` and `ellipse()` to make use of `lyon_geom::Arc` for approximating an arc with quadratic bezier curves. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #25331 <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
|
I have a feeling that there may be a more elegant way of calculating the sweep. The checks for various edge cases seem like they could be reduced with some math tricks, but maybe I'm just overthinking. |
|
|
|
I sqashed the commits, so this is good to go from my side! |
|
@bors-servo r+ |
|
|
|
|
pylbrecht commentedFeb 19, 2020
•
edited
Refactor
arc()andellipse()to make use oflyon_geom::Arcfor approximating an arc with quadratic bezier curves../mach build -ddoes not report any errors./mach test-tidydoes not report any errors