Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::browser::BrowserGpuTaskQueue Class Reference

Accessed exclusively by the GPU owner. New work cannot extend an executing batch. More...

#include "donner/gpu/browser/BrowserGpuTaskQueue.h"

Public Member Functions

void enqueue (BrowserGpuTask &task)
 Append a live, currently unqueued task.
std::size_t executeBatch ()
 Execute the current batch in FIFO order, returning its size. Reentrant work stays queued.
template<typename Predicate>
std::size_t executeBatchWhile (Predicate admit)
 Execute a prefix of the detached batch while the caller admits another callback. Unstarted entries stay ahead of any work appended reentrantly.
bool empty () const
 Whether every queued callback has been handed off for execution.

Detailed Description

Accessed exclusively by the GPU owner. New work cannot extend an executing batch.

Member Function Documentation

◆ enqueue()

void donner::gpu::browser::BrowserGpuTaskQueue::enqueue ( BrowserGpuTask & task)
inline

Append a live, currently unqueued task.

Parameters
taskBorrowed until its callback runs.

◆ executeBatchWhile()

template<typename Predicate>
std::size_t donner::gpu::browser::BrowserGpuTaskQueue::executeBatchWhile ( Predicate admit)
inline

Execute a prefix of the detached batch while the caller admits another callback. Unstarted entries stay ahead of any work appended reentrantly.

Parameters
admitReceives the number of callbacks already started in this batch.

The documentation for this class was generated from the following file: