Viewport Refresh Driver
class ViewportRefreshDriver(scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default))
Shared machinery for layers that re-fetch their renderables for the current viewport during render — used by earth.worldwind.ogc.wfs.WfsLayer (network) and BulkFeatureLayer (cache). Encapsulates the subtle parts: padded-sector hysteresis, debounce, the optimistic-sector + cancellation ordering, and the off-thread-build / render-thread-swap handoff.
Threading: onRender runs on the render thread; fetch runs on scope and only writes the volatile pending holder, which the render thread applies — the renderables list is never mutated off-thread while being iterated.
Constructors
Properties
Functions
Link copied to clipboard
fun onRender(visible: Sector, apply: (List<Renderable>) -> Unit, fetch: suspend (Sector) -> List<Renderable>)