ComposeMapHost

Supplies the window integrations a map uses on desktop.

Applications running their own Compose windowing report the GPU context and its owning thread, plus any supported platform-window integration. Install one with ProvideMapHost.

Properties

Link copied to clipboard

The backend Compose draws this scene with, which decides how MapLibre's output reaches it.

Link copied to clipboard
abstract val description: String

A short description of this host, used in diagnostics.

Link copied to clipboard

How this host shares textures when backend is ComposeRenderBackend.OPENGL.

Link copied to clipboard

The window that XDG portals use to parent system dialogs, when the host can provide one.

Functions

Link copied to clipboard
abstract fun gpuContext(): ComposeGpuContext?

The context Compose is currently drawing with, or null when it does not exist yet — Skia contexts are commonly created while producing the first frame, which the map reports as a skipped frame.

Link copied to clipboard
abstract fun runOnGpuThread(action: Runnable)

Runs action with exclusive access to this host's Skia context, and waits for it.