Skip to content

Conversation

@vorporeal
Copy link
Contributor

@vorporeal vorporeal commented Dec 2, 2025

Description

Right now, Surface::configure() and Surface::get_current_texture() produce fatal errors if the device has been lost. This prevents applications from gracefully handling device loss in these circumstances.

This PR changes the logic for these functions to make them non-fatal, using the surface's error sink (when available).

Testing

This logic has been live in production in Warp for over a year; I'm finally getting around to upstreaming it.

Squash or Rebase?

Squash.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant