Skip to main content

spawn_pending_decodes

Function spawn_pending_decodes 

Source
pub fn spawn_pending_decodes(
    server: ResMut<'_, AssetServer>,
    pending: Query<'_, '_, (Entity, &ImageSource), (Without<LoadedImage>, Without<LoadedSvg>, Without<ImageLoadFailed>, Without<Enqueued>)>,
    commands: Commands<'_, '_>,
    frame_dirty: Option<ResMut<'_, FrameDirty>>,
)
Expand description

Consults the content cache for each ImageSource entity lacking a LoadedImage, LoadedSvg, ImageLoadFailed, or Enqueued. Cache hits attach the cached component synchronously; misses enqueue one decode job and append the entity (with its current request_id) to the fan-out list.