Skip to content

fix(native): carry clip ids through the Linux paint surface - #497

Merged
Ernxst merged 1 commit into
mainfrom
fix/linux-paint-surface-clip-id
Sep 11, 2026
Merged

Ernxst merged 1 commit into
mainfrom
fix/linux-paint-surface-clip-id

Conversation

@Ernxst

@Ernxst Ernxst commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Harness: Claude Code
Agent: none
Model: anthropic/claude-opus-5

Task statements
  1. List the small open issues that remain. (Working-directory and workflow instructions omitted.)

  2. Leave the two canvas WPT issues out, as they are reserved. (Working-directory and workflow instructions omitted.)

  3. Fix the reduced-motion example test flake and close the unreproducible screenshot drift issue. (Working-directory and workflow instructions omitted.)

  4. Identify the next smallest issue. (Working-directory and workflow instructions omitted.)

  5. Carry out the tick-starvation measurement, keeping the scale-transform issue open for a later effort estimate. (Working-directory and workflow instructions omitted.)

  6. Close the release-automation and GPU-test tracking issues, and discuss the stacking-order issue's scope. (Working-directory and workflow instructions omitted.)

  7. Measure the Linux bundle size and profile the scroll-redraw issue; fix the submodule breakage found on the way. (Working-directory and workflow instructions omitted.)

Moves the zed submodule to Ernxst/zed fix/linux-paint-surface-clip-id, which repairs the Linux and FreeBSD build.

The scene clip-node change replaced per-primitive content masks with clip ids. The wgpu compositing path, merged later, was still written against the old shape:

 PaintSurface
-  content_mask: ContentMask     # removed from the struct
+  clip_id: u32                  # resolved against scene.clips

gpui's paint_surface now records current_clip_id() like every other primitive, and gpui_wgpu's draw_surfaces resolves that id to the clip node's folded_bounds, falling back to the surface's own bounds when no node applies.

Before this, a Linux target check failed at the struct literal:

error[E0560]: struct `scene::PaintSurface` has no field named `content_mask`
error: could not compile `gpui` (lib) due to 1 previous error
Check Before After
cargo check --target x86_64-unknown-linux-gnu --no-default-features --all-targets fails in gpui, then in gpui_wgpu passes
cargo check --all-targets (host, macOS) passes passes

macOS and Windows were never affected: the surface path is gated to Linux and FreeBSD. CI builds Linux only on manual dispatch, and the last dispatch predates the merge that introduced this, which is why it went unnoticed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeLg4hAoSTfk74kTf2r4iY

Moves the zed submodule to Ernxst/zed fix/linux-paint-surface-clip-id.
paint_surface records the current clip id instead of a content mask, and
gpui_wgpu resolves that id against the scene's clip nodes, which restores
the Linux and FreeBSD build after the clip-node and wgpu-compositing
changes crossed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeLg4hAoSTfk74kTf2r4iY
@Ernxst Ernxst self-assigned this Sep 11, 2026
@Ernxst
Ernxst merged commit 62a73ac into main Sep 11, 2026
@Ernxst
Ernxst deleted the fix/linux-paint-surface-clip-id branch September 11, 2026 22:40
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