fix(gui): preserve animated WebP sticker frames

Merged
JL
12h ago
+163-1

Animated stickers used GPUI's Arc<Image> decoding path, which converts WebP into one static frame. Decode sticker WebP through a cached background GPUI asset that retains composited frames and delays, with transparent backgrounds and BGRA pixels. The identified image element handles looping on desktop and web, respecting GPUI's reduced-motion and window-activity behavior.

The existing encoded-image cache and validation budgets remain in place. No dependency or manifest changes.

Validation of head 144d906:

  • cargo test -p oxidezap-gui --all-features: 574 passed, 7 ignored.
  • Regression tests cover distinct frames and delays, static transparency, BGRA colors, and three playback loops while preserving the cached decoded object. The playback test observes GPUI texture uploads using a synthetic two-frame WebP.
  • cargo clippy -p oxidezap-gui --all-targets --all-features -- -D warnings: passed.
  • Formatting and diff checks: passed.
  • Shared-memory wasm compilation with nightly and -Z build-std=std,panic_abort: passed with existing target-specific warnings.
  • Codex reviewed this exact head without findings.

No interactive native or browser session was exercised locally. Native regression uses GPUI's test platform; local web validation compiles the shared implementation. Check remote workflows for platform qualification.

GPUI's redundant between-frame redraw scheduling remains present in the latest published gpui-pre 0.3.10 and inspected Zed main commit 025d2a06ee7920777bf4947f11e46a1f52e62cbb. Per the user's direction, that separate improvement is tracked in #266 and does not expand this functional fix. The review thread records this deferral explicitly. No merge or deploy.