Skip to main content

MAX_INVALID_RECONFIGURES

Constant MAX_INVALID_RECONFIGURES 

Source
pub const MAX_INVALID_RECONFIGURES: u8 = 3;
Expand description

Cap on consecutive Invalid-acquire reconfigure retries before the machine gives up and transitions to SurfacePhase::SurfaceLost.

Mirrors frust-shell-ios::ffi_support::MAX_RECREATE_ATTEMPTS’s style and rationale, applied one step earlier in the lifecycle: without a cap, a persistently-Invalid swapchain would retry a reconfigure every frame, forever. At the cap the existing per-shell SurfaceLost recovery paths take over instead — desktop recreates on the next resize/redraw, iOS’s own recover_surface (capped separately), Android on the next surfaceChanged — so no shell code needs to change for this to be honoured.