RenderSessionHandle class final

Owner of one native handle.

A render session draws a map into a surface or a texture.

See mln_render_session in the C API reference.

Implemented types

Properties

discarding → RenderSessionHandleDiscarding
no setter
hashCode → int
The hash code for this object.
no setterinherited
id → int
The native handle id.
no setter
isClosed → bool
Whether the binding has accepted a release, dispose, or discard of this handle.
no setter
ready → Future<void>
Completes once the session is ready, and fails with a MaplibreException when it fails to become ready. Asynchronous calls on the session before then wait for it. A failure that nothing awaits isn't reported to the zone.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

abandon() → RenderAbandonResult
Stops the session right away, without running its pending graphics work.
acquireFrame() → AcquiredFrameHandle?
Takes the newest rendered frame from the session's texture ring, if one is ready.
barrier() → Future<void>
Ends the session's pending frame demands and waits for its earlier work.
clearData() → Future<void>
Clears the data that the session's renderer holds, such as loaded tiles, and draws the map again.
demandFrame(FrameDemand demand) → void
Asks the session to render a frame.
detach() → Future<void>
Detaches the session from its map and frees its graphics objects.
dispose() → void
Releases the session in any state, and finishes in the background.
drainFrameResults() → List<RenderFrameResult>
Takes the frame results that the session has queued.
dumpDebugLogs() → Future<void>
Logs debugging information about the session's renderer.
getCapabilities() → RenderSessionCapabilities
Reads what the session supports.
getClusterChildren(String sourceId, int clusterId) → Future<Object?>
Reads the children of a cluster in a clustered GeoJSON source.
getClusterExpansionZoom(String sourceId, int clusterId) → Future<int>
Reads the zoom level at which a cluster of a clustered GeoJSON source splits.
getClusterLeaves(String sourceId, int clusterId, int limit, int offset) → Future<Object?>
Reads the points in a cluster of a clustered GeoJSON source.
getFailure() → String
Reads the message of the error that made the session fail.
getSnapshot() → RenderSessionSnapshot
Reads the session's current state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryRenderedFeatures(RenderedQueryGeometry geometry, {RenderedFeatureQueryOptions? options}) → Future<List<RenderedFeature>>
Finds the features that the session drew in an area of the screen.
querySourceFeatures(String sourceId, {SourceFeatureQueryOptions? options}) → Future<List<SourceFeature>>
Finds the features of the source named sourceId.
readTexture() → Future<TextureReadbackResult>
Reads the pixels of the last frame that the session rendered.
reduceMemoryUse() → Future<void>
Frees memory that the session's renderer can rebuild, such as caches.
release() → Future<void>
Releases the session, detaching it first when it is attached.
releaseTarget() → Future<void>
Lets go of the session's surface or textures, and keeps the rest of the session.
resize(LogicalSize logicalSize) → Future<CommandCompletion>
Resizes the session's target and its map.
setAndroidSurfaceTarget(AndroidSurfaceReplacement replacement) → Future<void>
Replaces the Android window that the session presents to.
setFramePacer({FramePacerHandle? pacer}) → void
Sets the frame pacer that demands the session's frames.
setMetalBorrowedTextureTarget(MetalBorrowedTextureReplacement replacement) → Future<void>
Replaces the Metal textures that a borrowed ring renders into.
setMetalSurfaceTarget(MetalSurfaceReplacement replacement) → Future<void>
Replaces the Metal layer that the session renders to.
setOpenGlBorrowedTextureTarget(OpenGlBorrowedTextureReplacement replacement) → Future<void>
Replaces the OpenGL textures that a borrowed ring renders into.
setOpenGlSurfaceTarget(OpenGlSurfaceReplacement replacement) → Future<void>
Replaces the OpenGL surface that the session presents to.
setVulkanBorrowedTextureTarget(VulkanBorrowedTextureReplacement replacement) → Future<void>
Replaces the Vulkan images that a borrowed ring renders into.
setVulkanSurfaceTarget(VulkanSurfaceReplacement replacement) → Future<void>
Replaces the Vulkan surface that the session presents to.
setWaylandSurfaceTarget(WaylandSurfaceReplacement replacement) → Future<void>
Replaces the Wayland surface that the session presents to.
setWin32WindowTarget(Win32WindowReplacement replacement) → Future<void>
Replaces the Win32 window that the session presents to.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited