MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
render_session.h
Go to the documentation of this file.
1
5
6#ifndef MAPLIBRE_NATIVE_C_RENDER_SESSION_H
7#define MAPLIBRE_NATIVE_C_RENDER_SESSION_H
8
9#ifndef __cplusplus
10#include <stdbool.h>
11#endif
12
13#include <stddef.h>
14#include <stdint.h>
15
16#include "base.h"
17#include "completion.h"
18#include "render_target.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
43
53
61typedef enum MLN_BINDING("kind=bitmask") mln_frame_demand_flag : uint32_t {
73
75typedef uint32_t mln_frame_demand_flags;
76
81#define MLN_FRAME_DEMAND_TOKEN_STILL_IMAGE UINT64_MAX
82
90
109
112 uint32_t size;
113 uint32_t result_size;
115 MLN_BINDING("length=result_count;stride=result_size");
117} mln_render_frame_batch_view MLN_BINDING("kind=slice");
118
141
151
159
162 mln_render_session session,
163 mln_render_session_capabilities* out_capabilities
164 MLN_BINDING("direction=out"),
165 mln_diagnostic* out_diagnostic
166) MLN_NOEXCEPT;
167
169MLN_BINDING("execution=snapshot")
171 mln_render_session session,
172 mln_render_session_snapshot* out_snapshot MLN_BINDING("direction=out"),
173 mln_diagnostic* out_diagnostic
174) MLN_NOEXCEPT;
175
189 mln_render_session session,
190 char* out_message MLN_BINDING(
191 "direction=out;length=message_capacity;result_length=out_message_length"
192 ),
193 size_t message_capacity,
194 size_t* out_message_length MLN_BINDING("direction=out"),
195 mln_diagnostic* out_diagnostic
196) MLN_NOEXCEPT;
197
218 mln_render_session session, const mln_frame_demand* demand,
219 mln_diagnostic* out_diagnostic
220) MLN_NOEXCEPT;
221
223typedef enum MLN_BINDING(
224 "kind=bitmask"
225) mln_frame_pacer_option_field : uint32_t {
228
231
234 uint32_t size;
241 uint32_t maximum_frames_per_second MLN_BINDING(
242 "mask=fields;bit=MLN_FRAME_PACER_OPTION_MAXIMUM_FRAMES_PER_SECOND"
243 );
245
262 mln_render_session session,
263 mln_frame_pacer pacer MLN_BINDING("nullable=true"),
264 mln_diagnostic* out_diagnostic
265) MLN_NOEXCEPT;
266
273MLN_API void mln_frame_pacer_release(mln_frame_pacer pacer) MLN_NOEXCEPT;
274
285MLN_BINDING("execution=event_batch")
287 mln_render_session session,
288 mln_render_frame_batch* out_batch MLN_BINDING("direction=out;nullable=true"),
289 mln_render_frame_batch_view* out_view MLN_BINDING("direction=out"),
290 mln_diagnostic* out_diagnostic
291) MLN_NOEXCEPT;
292
296) MLN_NOEXCEPT;
297
317 mln_render_session session,
318 mln_acquired_frame* out_frame MLN_BINDING("direction=out;nullable=true"),
319 mln_diagnostic* out_diagnostic
320) MLN_NOEXCEPT;
321
329 mln_acquired_frame frame,
330 mln_render_frame_result* out_result MLN_BINDING("direction=out"),
331 mln_diagnostic* out_diagnostic
332) MLN_NOEXCEPT;
333
345MLN_BINDING("view_owner=frame")
347 mln_acquired_frame frame, mln_gpu_sync* out_sync MLN_BINDING("direction=out"),
348 mln_diagnostic* out_diagnostic
349) MLN_NOEXCEPT;
350
370 mln_acquired_frame frame, const mln_gpu_sync* consumer_completion,
371 mln_diagnostic* out_diagnostic
372) MLN_NOEXCEPT;
373
390 mln_acquired_frame frame,
391 void** out_scope MLN_BINDING("direction=out;kind=context"),
392 mln_diagnostic* out_diagnostic
393) MLN_NOEXCEPT;
394
397 void* scope MLN_BINDING("kind=context")
398) MLN_NOEXCEPT;
399
414MLN_BINDING("execution=command")
416 mln_render_session session, mln_logical_size logical_size,
417 const mln_completion* completion, mln_diagnostic* out_diagnostic
418) MLN_NOEXCEPT;
419
442MLN_BINDING("execution=operation")
444 mln_render_session session, const mln_completion* completion,
445 mln_diagnostic* out_diagnostic
446) MLN_NOEXCEPT;
447
458MLN_BINDING("execution=operation")
460 mln_render_session session, const mln_completion* completion,
461 mln_diagnostic* out_diagnostic
462) MLN_NOEXCEPT;
463
471MLN_BINDING("execution=operation")
473 mln_render_session session, const mln_completion* completion,
474 mln_diagnostic* out_diagnostic
475) MLN_NOEXCEPT;
476
485MLN_BINDING("execution=operation")
487 mln_render_session session, const mln_completion* completion,
488 mln_diagnostic* out_diagnostic
489) MLN_NOEXCEPT;
490
498MLN_BINDING("execution=operation")
500 mln_render_session session, const mln_completion* completion,
501 mln_diagnostic* out_diagnostic
502) MLN_NOEXCEPT;
503
516MLN_BINDING("after_release=true")
518 mln_render_session session, mln_diagnostic* out_diagnostic
519) MLN_NOEXCEPT;
520
533MLN_BINDING("execution=lifecycle")
535 mln_render_session session, const mln_completion* completion,
536 mln_diagnostic* out_diagnostic
537) MLN_NOEXCEPT;
538
558 mln_render_session session,
559 mln_render_abandon_result* out_result MLN_BINDING("direction=out"),
560 mln_diagnostic* out_diagnostic
561) MLN_NOEXCEPT;
562
580MLN_BINDING("execution=lifecycle")
582 mln_render_session session, const mln_completion* completion,
583 mln_diagnostic* out_diagnostic
584) MLN_NOEXCEPT;
585
596 mln_render_session session, mln_diagnostic* out_diagnostic
597) MLN_NOEXCEPT;
598
606 mln_acquired_frame frame, mln_diagnostic* out_diagnostic
607) MLN_NOEXCEPT;
608
609#ifdef __cplusplus
610}
611#endif
612
613#endif // MAPLIBRE_NATIVE_C_RENDER_SESSION_H
uint64_t mln_render_session
Definition base.h:147
uint64_t mln_render_frame_batch
Definition base.h:159
uint64_t mln_acquired_frame
Definition base.h:154
mln_status
Definition base.h:41
uint64_t mln_frame_pacer
Definition base.h:164
mln_status mln_render_session_reduce_memory_use(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_get_snapshot(mln_render_session session, mln_render_session_snapshot *out_snapshot, mln_diagnostic *out_diagnostic)
mln_render_abandon_disposition
Definition render_session.h:143
@ MLN_RENDER_ABANDON_DISPOSITION_QUARANTINED
Definition render_session.h:149
@ MLN_RENDER_ABANDON_DISPOSITION_CLEAN
Definition render_session.h:144
mln_frame_pacer_option_field
Definition render_session.h:225
@ MLN_FRAME_PACER_OPTION_MAXIMUM_FRAMES_PER_SECOND
Definition render_session.h:226
mln_status mln_render_session_release(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_dispose(mln_render_session session, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_get_failure(mln_render_session session, char *out_message, size_t message_capacity, size_t *out_message_length, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_release(mln_acquired_frame frame, const mln_gpu_sync *consumer_completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_set_frame_pacer(mln_render_session session, mln_frame_pacer pacer, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_release_target(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_abandon(mln_render_session session, mln_render_abandon_result *out_result, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_service_driver_work(mln_render_session session, mln_diagnostic *out_diagnostic)
void mln_frame_pacer_release(mln_frame_pacer pacer)
void mln_acquired_frame_view_end(void *scope)
mln_render_session_state
Definition render_session.h:45
@ MLN_RENDER_SESSION_STATE_ATTACHED
Definition render_session.h:47
@ MLN_RENDER_SESSION_STATE_DETACHED
Definition render_session.h:49
@ MLN_RENDER_SESSION_STATE_FAILED
Definition render_session.h:50
@ MLN_RENDER_SESSION_STATE_ABANDONED
Definition render_session.h:51
@ MLN_RENDER_SESSION_STATE_DETACHING
Definition render_session.h:48
@ MLN_RENDER_SESSION_STATE_ATTACHING
Definition render_session.h:46
mln_status mln_render_session_resize(mln_render_session session, mln_logical_size logical_size, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_acquire_frame(mln_render_session session, mln_acquired_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_result(mln_acquired_frame frame, mln_render_frame_result *out_result, mln_diagnostic *out_diagnostic)
uint32_t mln_frame_demand_flags
Definition render_session.h:75
mln_frame_demand_flag
Definition render_session.h:61
@ MLN_FRAME_DEMAND_WAIT_FOR_UPDATE
Definition render_session.h:71
@ MLN_FRAME_DEMAND_FORCE
Definition render_session.h:66
mln_status mln_render_session_detach(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_clear_data(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_discard(mln_acquired_frame frame, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_demand_frame(mln_render_session session, const mln_frame_demand *demand, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_drain_frame_results(mln_render_session session, mln_render_frame_batch *out_batch, mln_render_frame_batch_view *out_view, mln_diagnostic *out_diagnostic)
uint32_t mln_frame_pacer_option_fields
Definition render_session.h:230
mln_status mln_render_session_barrier(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_producer_sync(mln_acquired_frame frame, mln_gpu_sync *out_sync, mln_diagnostic *out_diagnostic)
mln_render_result
Definition render_session.h:25
@ MLN_RENDER_RESULT_TARGET_NOT_READY
Definition render_session.h:34
@ MLN_RENDER_RESULT_FAILED
Definition render_session.h:41
@ MLN_RENDER_RESULT_SUPERSEDED
Definition render_session.h:36
@ MLN_RENDER_RESULT_NO_UPDATE
Definition render_session.h:28
@ MLN_RENDER_RESULT_RENDERED
Definition render_session.h:26
void mln_render_frame_batch_release(mln_render_frame_batch batch)
mln_status mln_render_session_get_capabilities(mln_render_session session, mln_render_session_capabilities *out_capabilities, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_view_begin(mln_acquired_frame frame, void **out_scope, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_dump_debug_logs(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_render_mode
Definition runtime.h:292
Definition completion.h:66
Definition base.h:84
Definition render_session.h:84
uint32_t size
Definition render_session.h:85
uint64_t token
Definition render_session.h:88
mln_frame_demand_flags flags
Definition render_session.h:86
Definition render_session.h:233
uint32_t size
Definition render_session.h:234
mln_frame_pacer_option_fields fields
Definition render_session.h:235
uint32_t maximum_frames_per_second
Definition render_session.h:243
Definition render_target.h:190
Definition map.h:189
Definition map.h:196
Definition map.h:1191
Definition render_session.h:153
uint32_t size
Definition render_session.h:154
uint32_t quarantined_resource_count
Definition render_session.h:156
uint32_t reserved
Definition render_session.h:157
mln_render_abandon_disposition disposition
Definition render_session.h:155
Definition render_session.h:111
uint32_t result_size
Definition render_session.h:113
size_t result_count
Definition render_session.h:116
uint32_t size
Definition render_session.h:112
const mln_render_frame_result * results
Definition render_session.h:115
Definition render_session.h:92
mln_render_result disposition
Definition render_session.h:94
uint32_t size
Definition render_session.h:93
mln_render_mode mode
Definition render_session.h:107
mln_map_view view
Definition render_session.h:106
uint64_t generation
Definition render_session.h:102
bool needs_repaint
Definition render_session.h:104
uint64_t frame_generation
Definition render_session.h:103
uint64_t token
Definition render_session.h:95
uint64_t map_update_generation
Definition render_session.h:101
Definition render_target.h:171
Definition render_session.h:120
uint32_t acquired_frame_count
Definition render_session.h:127
uint64_t frame_generation
Definition render_session.h:126
uint32_t size
Definition render_session.h:121
bool has_target
Definition render_session.h:139
uint64_t generation
Definition render_session.h:125
mln_status failure_status
Definition render_session.h:133
mln_render_session_state state
Definition render_session.h:122
mln_logical_extent extent
Definition render_session.h:124