Method

MaplibreNativeFfiRenderSessionset_frame_pacer

Declaration [src]

gboolean
maplibre_native_ffi_render_session_set_frame_pacer (
  MaplibreNativeFfiRenderSession* self,
  MaplibreNativeFfiFramePacer* pacer,
  GError** error
)

Description [src]

Sets the frame pacer that demands the session’s frames.

At the first display refresh after the session has something new to draw, pacer demands a frame without flags and with token 0. One pacer can serve many sessions. A null pacer stops pacing the session. You can call it once the attach call returns.

See mln_render_session_set_frame_pacer in the C API reference.

It fails with these errors:

  • MAPLIBRE_NATIVE_FFI_ERROR_TARGET_LOST or MAPLIBRE_NATIVE_FFI_ERROR_NATIVE_ERROR, as MaplibreNativeFfiRenderSessionSnapshot.failure_status reports, when the session has failed.
  • MAPLIBRE_NATIVE_FFI_ERROR_INVALID_STATE when you attached the session with a redraw wake, or detached, abandoned, released, or disposed it.

Parameters

pacer

Type: MaplibreNativeFfiFramePacer

The handle, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE on success, or FALSE with error set.