-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
gpui: Enable MSAA to Path render for Anti-Aliasing #22812
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
…th 4 points." This reverts commit 693258f.
This comment was marked as resolved.
This comment was marked as resolved.
There need a method to check if the system supports a specific sample count. Ref zed-industries/zed#22812 need this feature to setup sample_count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Wait #22808 to merge, then the painting example will be ok: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everyone seems fine with the changes in their current form, it seems?
I will serve as a tie-breaker (again) and merge this after next Wednesday's release.
@huacnlee can we merge/rebase on fresh main please? |
😂 I don't have a computer right now, I'm on holiday for the Chinese New Year. |
No rush, we can get back to that later, and sorry for the pings. Happy holidays! |
Release Notes: - N/A --- Continue #20499 We to draw more complex Path. Before this change, we only have `line_to`, but it is not enough. Add a new `PathBuilder` to use [lyon](https://github.com/nical/lyon) to build more complex path. And then with PR #22812 to enable anti-aliasing, all thing will be perfect. ## Show case ```bash cargo run -p gpui --example painting ``` Before: <img width="1136" alt="image" src="https://github.com/user-attachments/assets/0c15833a-ec95-404c-a469-24cf172cfd86" /> After: <img width="1136" alt="image" src="https://github.com/user-attachments/assets/42cfa35e-7e8f-4ef3-bb2d-b98defc62ad6" />
Closes #20762
Release Notes:
Enable MSAA for Anti-Aliasing to Path (
cx.paint_path
) for drawing a better vector graphics.Before
After
TODO
PathBuilder
based on lyon to buildPath
#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 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.