Skip to content

gpui: Draw Path with 2x to anti-aliasing.#13

Closed
huacnlee wants to merge 3 commits into
mainfrom
anti-alising-path
Closed

gpui: Draw Path with 2x to anti-aliasing.#13
huacnlee wants to merge 3 commits into
mainfrom
anti-alising-path

Conversation

@huacnlee

@huacnlee huacnlee commented Nov 26, 2024

Copy link
Copy Markdown
Owner

Before

image image

After

image image

@huacnlee

Copy link
Copy Markdown
Owner Author

image

@huacnlee huacnlee marked this pull request as draft November 26, 2024 14:17
@huacnlee

huacnlee commented Nov 27, 2024

Copy link
Copy Markdown
Owner Author

@huacnlee

huacnlee commented Jan 7, 2025

Copy link
Copy Markdown
Owner Author

kvark/blade#213

@huacnlee huacnlee closed this Jan 16, 2025
huacnlee pushed a commit that referenced this pull request Apr 14, 2026
)

When atlas tiles are rapidly allocated and freed (e.g. watching a shared
screen in Collab), a texture can become unreferenced and be removed
while GPU uploads for it are still pending. On the next frame,
`flush_uploads` indexes into the now-empty texture slot and panics:

```
  thread 'main' panicked at crates/gpui_wgpu/src/wgpu_atlas.rs:231:40:
  texture must exist...

  #11 core::option::expect_failed
  #12 gpui_wgpu::wgpu_atlas::WgpuAtlas::before_frame
  #13 gpui_wgpu::wgpu_renderer::WgpuRenderer::draw
```

This change drains pending uploads for a texture when it becomes
unreferenced in `remove`, and skips uploads for missing textures in
`flush_uploads` as a safety net.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Fixed occasional crashes when viewing a screen share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant