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
52
54typedef enum mln_render_session_state : uint32_t {
55 MLN_RENDER_SESSION_STATE_ATTACHING = 1U,
56 MLN_RENDER_SESSION_STATE_ATTACHED = 2U,
57 MLN_RENDER_SESSION_STATE_DETACHING = 3U,
58 MLN_RENDER_SESSION_STATE_DETACHED = 4U,
65 MLN_RENDER_SESSION_STATE_ABANDONED = 6U,
67
95
97typedef struct mln_frame_demand {
98 uint32_t size;
103 uint32_t flags MLN_BINDING("enum=mln_frame_demand_flag");
105 uint64_t token;
107
117 uint32_t size;
119 uint32_t disposition MLN_BINDING("enum=mln_render_result");
120 uint64_t token;
132 uint64_t generation;
156
164 uint32_t size;
169 uint32_t result_size;
174 MLN_BINDING("length=result_count;stride=result_size");
178
208
216
217typedef struct mln_render_abandon_result {
218 uint32_t size;
220 uint32_t disposition MLN_BINDING("enum=mln_render_abandon_disposition");
222 uint32_t quarantined_resource_count;
223 uint32_t reserved MLN_BINDING("kind=reserved");
224} mln_render_abandon_result;
225
228
240 mln_render_session session,
241 mln_render_session_capabilities* out_capabilities
242 MLN_BINDING("direction=out"),
243 mln_diagnostic* out_diagnostic
244) MLN_NOEXCEPT;
245
256MLN_BINDING("execution=snapshot")
258 mln_render_session session,
259 mln_render_session_snapshot* out_snapshot MLN_BINDING("direction=out"),
260 mln_diagnostic* out_diagnostic
261) MLN_NOEXCEPT;
262
283 mln_render_session session, const mln_frame_demand* demand,
284 mln_diagnostic* out_diagnostic
285) MLN_NOEXCEPT;
286
303MLN_BINDING("execution=event_batch")
305 mln_render_session session,
306 mln_render_frame_batch* out_batch MLN_BINDING("direction=out"),
307 mln_diagnostic* out_diagnostic
308) MLN_NOEXCEPT;
309
322 mln_render_frame_batch_view* out_view MLN_BINDING("direction=out"),
323 mln_diagnostic* out_diagnostic
324) MLN_NOEXCEPT;
325
329) MLN_NOEXCEPT;
330
349MLN_BINDING("absent_on=MLN_STATUS_NOT_READY")
351 mln_render_session session,
352 mln_acquired_frame* out_frame MLN_BINDING("direction=out"),
353 mln_diagnostic* out_diagnostic
354) MLN_NOEXCEPT;
355
368 mln_acquired_frame frame,
369 mln_render_frame_result* out_result MLN_BINDING("direction=out"),
370 mln_diagnostic* out_diagnostic
371) MLN_NOEXCEPT;
372
391MLN_BINDING("view_owner=frame")
393 mln_acquired_frame frame, mln_gpu_sync* out_sync MLN_BINDING("direction=out"),
394 mln_diagnostic* out_diagnostic
395) MLN_NOEXCEPT;
396
419 mln_acquired_frame frame, const mln_gpu_sync* consumer_completion,
420 mln_diagnostic* out_diagnostic
421) MLN_NOEXCEPT;
422
444 mln_acquired_frame frame,
445 void** out_scope MLN_BINDING("direction=out;kind=context"),
446 mln_diagnostic* out_diagnostic
447) MLN_NOEXCEPT;
448
451 void* scope MLN_BINDING("kind=context")
452) MLN_NOEXCEPT;
453
487MLN_BINDING("execution=command")
490 const mln_completion* completion, mln_diagnostic* out_diagnostic
491) MLN_NOEXCEPT;
492
510MLN_BINDING("execution=operation")
512 mln_render_session session, const mln_completion* completion,
513 mln_diagnostic* out_diagnostic
514) MLN_NOEXCEPT;
515
531MLN_BINDING("execution=operation")
533 mln_render_session session, const mln_completion* completion,
534 mln_diagnostic* out_diagnostic
535) MLN_NOEXCEPT;
536
552MLN_BINDING("execution=operation")
554 mln_render_session session, const mln_completion* completion,
555 mln_diagnostic* out_diagnostic
556) MLN_NOEXCEPT;
557
573MLN_BINDING("execution=operation")
575 mln_render_session session, const mln_completion* completion,
576 mln_diagnostic* out_diagnostic
577) MLN_NOEXCEPT;
578
611 mln_render_session session, mln_diagnostic* out_diagnostic
612) MLN_NOEXCEPT;
613
645MLN_BINDING("execution=lifecycle")
647 mln_render_session session, const mln_completion* completion,
648 mln_diagnostic* out_diagnostic
649) MLN_NOEXCEPT;
650
698 mln_render_session session,
699 mln_render_abandon_result* out_result MLN_BINDING("direction=out"),
700 mln_diagnostic* out_diagnostic
701) MLN_NOEXCEPT;
702
722 mln_render_session session, mln_diagnostic* out_diagnostic
723) MLN_NOEXCEPT;
724
747 mln_render_session session, mln_diagnostic* out_diagnostic
748) MLN_NOEXCEPT;
749
773 mln_acquired_frame frame, mln_diagnostic* out_diagnostic
774) MLN_NOEXCEPT;
775
776#ifdef __cplusplus
777}
778#endif
779
780#endif // MAPLIBRE_NATIVE_C_RENDER_SESSION_H
uint64_t mln_render_session
Definition base.h:161
uint64_t mln_render_frame_batch
Definition base.h:173
uint64_t mln_acquired_frame
Definition base.h:168
mln_status
Definition base.h:61
#define MLN_BINDING(contract)
Definition binding.h:17
mln_frame_demand mln_frame_demand_default(void)
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:210
@ MLN_RENDER_ABANDON_DISPOSITION_QUARANTINED
Definition render_session.h:214
@ MLN_RENDER_ABANDON_DISPOSITION_CLEAN
Definition render_session.h:212
mln_status mln_render_session_release(mln_render_session session, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_dispose(mln_render_session session, 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_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_acquired_frame_view_end(void *scope)
mln_render_session_state
Definition render_session.h:54
@ MLN_RENDER_SESSION_STATE_TARGET_LOST
Definition render_session.h:64
mln_status mln_render_session_acquire_frame(mln_render_session session, mln_acquired_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_render_frame_batch_get(mln_render_frame_batch batch, mln_render_frame_batch_view *out_view, 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)
mln_frame_demand_flag
Definition render_session.h:69
@ MLN_FRAME_DEMAND_PRESENT
Definition render_session.h:77
@ MLN_FRAME_DEMAND_WAIT_FOR_UPDATE
Definition render_session.h:93
@ MLN_FRAME_DEMAND_IF_NEEDED
Definition render_session.h:71
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_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_status mln_render_session_drain_frame_results(mln_render_session session, mln_render_frame_batch *out_batch, mln_diagnostic *out_diagnostic)
mln_render_result
Definition render_session.h:25
@ MLN_RENDER_RESULT_TARGET_NOT_READY
Definition render_session.h:48
@ MLN_RENDER_RESULT_SUPERSEDED
Definition render_session.h:50
@ MLN_RENDER_RESULT_NO_UPDATE
Definition render_session.h:41
@ MLN_RENDER_RESULT_RENDERED
Definition render_session.h:33
mln_status mln_render_session_resize(mln_render_session session, mln_logical_extent extent, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_dispose(mln_acquired_frame frame, mln_diagnostic *out_diagnostic)
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_request_frame(mln_render_session session, const mln_frame_demand *demand, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_dump_debug_logs(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
Definition completion.h:121
Definition base.h:100
Definition render_session.h:97
uint64_t token
Definition render_session.h:105
uint32_t flags
Definition render_session.h:103
Definition render_target.h:217
Definition map.h:162
Definition map.h:985
Definition render_session.h:163
uint32_t result_size
Definition render_session.h:169
size_t result_count
Definition render_session.h:176
const mln_render_frame_result * results
Definition render_session.h:174
Definition render_session.h:116
uint32_t disposition
Definition render_session.h:119
mln_map_view view
Definition render_session.h:154
uint64_t generation
Definition render_session.h:132
bool needs_repaint
Definition render_session.h:146
uint64_t frame_generation
Definition render_session.h:137
uint64_t map_update_generation
Definition render_session.h:127
Definition render_target.h:154
Definition render_session.h:180
uint32_t acquired_frame_count
Definition render_session.h:201
bool pending_changes
Definition render_session.h:206
uint64_t rendered_update_generation
Definition render_session.h:197
uint64_t frame_generation
Definition render_session.h:199
uint64_t map_update_generation
Definition render_session.h:192
uint64_t generation
Definition render_session.h:190
mln_logical_extent extent
Definition render_session.h:185
uint32_t state
Definition render_session.h:183