gpui: Add PathBuilder based on lyon to build Path#22808
Merged
Conversation
move_to method to Path.move_to method to Path
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Thanks for pointing out. The algorithm was written so for lacking such stroking algo and for performance consideration |
Contributor
|
@huacnlee and @JakkuSakura : If we wanted to animate a graph showing the performance of a program, how much of an impact would it have on the Registrazione.schermo.2025-01-08.alle.09.33.56.mov |
3 tasks
This comment was marked as outdated.
This comment was marked as outdated.
move_to method to PathPathBuilder based on lyon to build Path
Contributor
Author
|
Today I make a update to add |
PathBuilder based on lyon to build PathPathBuilder based on lyon to build Path
Contributor
Author
|
This is with MSAA enable by #22812
|
SomeoneToIgnore
approved these changes
Jan 28, 2025
SomeoneToIgnore
left a comment
Contributor
There was a problem hiding this comment.
Same comment as in #22812 (review)
Contributor
|
@huacnlee can we merge/rebase on fresh main please? |
Contributor
Author
|
@SomeoneToIgnore Done. |
Contributor
SomeoneToIgnore
pushed a commit
that referenced
this pull request
Jan 29, 2025
Closes #20762 Release Notes: - N/A --- Enable MSAA for Anti-Aliasing to Path (`cx.paint_path`) for drawing a better vector graphics. ```bash cargo run -p gpui --example gradient --features macos-blade cargo run -p gpui --example gradient cargo run -p gpui --example painting --features macos-blade cargo run -p gpui --example painting ``` **Before** <img width="1089" alt="image" src="https://github.com/user-attachments/assets/0ae7240f-4ba9-4ef5-896c-e436c1282770" /> **After** <img width="944" alt="image" src="https://github.com/user-attachments/assets/71a07ae8-be54-452c-aacc-b8cec1f810c0" /> ## TODO - [x] Support Metal and Blade. - [x] Detect system support to set up sample count. - [x] Fix extra lines between Path vertices wait #22808 to merge. Ref kvark/blade#213 Ask @kvark to review. I am not sure if there is anything I missed. I modified it according to the [particle](https://github.com/kvark/blade/tree/main/examples/particle) example of Blade project. But the difference is that after the first MSAA render, I did not do it a second time, I tested it and found it was not necessary.
SomeoneToIgnore
added a commit
that referenced
this pull request
Feb 5, 2025
This reverts commit 31fa414.
SomeoneToIgnore
pushed a commit
that referenced
this pull request
Feb 6, 2025
…lection top right corner radius issue (#24342) Release Notes: - N/A ---- To fix #24289 mention issue and revert PathBuilder and MSAA. I'm sorry about of this, in #22808 I was forgotten this bit of detail.  So, add `move_to` here, we can fix the selection top right corner radius issue. ## After change <img width="1383" alt="image" src="https://github.com/user-attachments/assets/28ea103c-d652-41d6-bbe0-7fd042d81e77" />
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.









Release Notes:
Continue #20499
We to draw more complex Path. Before this change, we only have
line_to, but it is not enough.Add a new
PathBuilderto use lyon to build more complex path.And then with PR #22812 to enable anti-aliasing, all thing will be perfect.
Show case
Before:
After: