Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
BrowserGpuOwnerWait.h File Reference

Opt-in browser fixture that arranges a real GPU request during an application-owner wait. More...

#include <cstdint>
#include <memory>
Include dependency graph for BrowserGpuOwnerWait.h:

Classes

struct  donner::editor::wasm::OwnerWaitProbeResult
struct  donner::editor::wasm::OwnerDispatchProbeProgress
 Progress of the owner dispatch probe, read from any thread. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

OwnerWaitProbeResult donner::editor::wasm::ExerciseGpuOwnerLibcWaitForTesting (const std::shared_ptr< gpu::browser::BrowserDevice > &device)
 The caller must hold no document access or canvas frame and supply live device ownership. The two-second loop deadline cannot preempt callbacks or finite nonwaiting SDK code. SDK blocking futex slices share that deadline, including post-exit join synchronization. A failed probe retains one bounded shared request until module teardown; successful return requires producer joining.
bool donner::editor::wasm::StartGpuOwnerDispatchProbeForTesting (const std::shared_ptr< gpu::browser::BrowserDevice > &device, uint32_t count)
 Starts a detached producer pthread that makes count real completion-query round trips to the GPU owner, one at a time, and returns at once. The owner serves them from its event loop, so a count above the owner's inline epoch budget (32 calls) cannot finish without a budget-renewing owner pulse. The caller keeps the module alive until the run stops running.
OwnerDispatchProbeProgress donner::editor::wasm::ReadGpuOwnerDispatchProbeForTesting ()

Detailed Description

Opt-in browser fixture that arranges a real GPU request during an application-owner wait.

Function Documentation

◆ ReadGpuOwnerDispatchProbeForTesting()

OwnerDispatchProbeProgress donner::editor::wasm::ReadGpuOwnerDispatchProbeForTesting ( )
Returns
The dispatch probe's progress.

◆ StartGpuOwnerDispatchProbeForTesting()

bool donner::editor::wasm::StartGpuOwnerDispatchProbeForTesting ( const std::shared_ptr< gpu::browser::BrowserDevice > & device,
uint32_t count )

Starts a detached producer pthread that makes count real completion-query round trips to the GPU owner, one at a time, and returns at once. The owner serves them from its event loop, so a count above the owner's inline epoch budget (32 calls) cannot finish without a budget-renewing owner pulse. The caller keeps the module alive until the run stops running.

Parameters
deviceLive device ownership the producer holds until it finishes.
countRound trips to make; must be positive.
Returns
False when a previous run is still running or the producer cannot start.