-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor 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. |
fbbbc87
to
436f8ee
Compare
@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. -->
💔 Test failed - status-taskcluster |
436f8ee
to
bd73dc0
Compare
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. |
☀️ Test successful - status-taskcluster |
7fa03bc
to
86ad6ed
Compare
I sqashed the commits, so this is good to go from my side! |
@bors-servo r+ |
📌 Commit 86ad6ed has been approved by |
☀️ Test successful - status-taskcluster |
Refactor
arc()
andellipse()
to make use oflyon_geom::Arc
for approximating an arc with quadratic bezier curves../mach build -d
does not report any errors./mach test-tidy
does not report any errors