# gpui: Enable MSAA to Path render for Anti-Aliasing \(\#22812\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/b9e0aae49fad996ddb0ce55225873e5c1d5abecd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: b9e0aae49fad996ddb0ce55225873e5c1d5abecd

Requested commit: b9e0aae49fad996ddb0ce55225873e5c1d5abecd

Commit: b9e0aae49fad996ddb0ce55225873e5c1d5abecd

Tree: d47a677a5edd8cac0fd6120617895181f3849b41

Author: Jason Lee

Committer: GitHub

## Message

````
gpui: Enable MSAA to Path render for Anti-Aliasing (#22812)

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 https://github.com/kvark/blade/pull/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.
````

## Parents

- [31fa4144226fcbd140bb4f26d80001f0abd6facd](https://git.cafe/gitcafe/zed/commit/31fa4144226fcbd140bb4f26d80001f0abd6facd?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/b9e0aae49fad996ddb0ce55225873e5c1d5abecd?format=markdown)
