Skip to main content

patch_changed_tiles

Function patch_changed_tiles 

Source
pub fn patch_changed_tiles(
    cache: &mut HashMap<TileId, ElevationGrid>,
    backfill_states: &mut HashMap<TileId, BackfillState>,
    changed: &HashSet<TileId>,
) -> HashSet<TileId>
Expand description

Run incremental backfill patching on all tiles affected by a set of newly loaded tiles.

For each tile in changed, its own borders are patched from any cached neighbours, and each cached neighbour’s border facing the changed tile is also patched.

backfill_states tracks which borders have already been filled so that redundant copies are skipped.

Returns the set of tiles whose cached grid was actually modified (useful for generation bumping / hillshade invalidation).