Skip to content

feat(gpui): add corner shapes and multi-stop linear gradients - #6

Closed
mateo-m wants to merge 10 commits into
remorses:gpuixfrom
mateo-m:gpui-corner-shapes-gradients
Closed

mateo-m wants to merge 10 commits into
remorses:gpuixfrom
mateo-m:gpui-corner-shapes-gradients

Conversation

@mateo-m

@mateo-m mateo-m commented Sep 4, 2026 •

Copy link
Copy Markdown

What this adds

  • Corner shapes per corner (round and bevel) on quads.
  • Linear gradients with more than two stops, with easing hints between stops.

GPUIX uses both for the CSS properties corner-shape and background-image.

What I ran and saw

  • The GPUIX native suite (201 tests) passes on top of this commit. It covers gradient stop resolution and corner rendering through the test renderer.
  • The GPUIX demo shows the gradients and corner panels on Metal, checked by eye and by screenshot this week.

What I did not verify

  • No revert-and-fail cycle for this commit. It predates this stack, so I did not watch its tests fail without it.
  • The DirectX path did not compile on this machine. macOS cannot build the windows crate.

Moved from the fork

The same stack, rebased onto zed-industries main, is open upstream as zed-industries#63772. This PR is the path for the GPUIX submodule, which follows the gpuix branch of this repo.

This PR was mateo-m/zed#1. The branch merged gpuix at 8802c83 before the move, with no conflicts. cargo check -p gpui -p gpui_wgpu passes on the merged head.

Stacked on #5. The diff here includes that PR. The effect layers PR builds on this branch.

mateo-m added 10 commits August 26, 2026 21:01
Taffy computes one tree at a time. The measure closure of
`Window::request_measured_layout` runs inside that computation, so an
element cannot lay a child out there, and `Window::layout_engine` is
`None` for the duration anyway. An element that wants to size itself
from content it has to measure has no way to do it.

`IsolatedLayout` holds a second tree for that content. `enter` puts it in
front of the window's tree for the duration of a closure and gives the
window its own tree back afterwards.

GPUIX needs this for a panel whose height animates to the height of its
content. The width is what the parent gives it, which taffy hands to the
measure closure, and the content has to be measured at that width for
text to wrap the way it will on screen.

Sent upstream as the same change on gpui/isolated-layout.
@mateo-m

mateo-m commented Sep 4, 2026 •

Copy link
Copy Markdown
Author

Reopened. This PR stays the path for the GPUIX submodule: AGENTS.md in remorses/gpuix asks for GPUI changes as commits on this branch before the submodule points at them. The same stack, rebased onto zed-industries main, is open as zed-industries#63772.

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