Skip to main content

tvg_engine_init

Function tvg_engine_init 

Source
pub unsafe extern "C" fn tvg_engine_init(
    threads: c_uint,
) -> Tvg_Result
Expand description

/ /** @brief Initializes the ThorVG engine.

ThorVG requires an active runtime environment to operate. Internally, it utilizes a task scheduler to efficiently parallelize rendering operations. You can specify the number of worker threads using the @p threads parameter. During initialization, ThorVG will spawn the specified number of threads.

@param[in] threads The number of worker threads to create. A value of zero indicates that only the main thread will be used.

@note The initializer uses internal reference counting to track multiple calls. The number of threads is fixed on the first call to tvg_engine_init() and cannot be changed in subsequent calls. @see tvg_engine_term()