Aggregate conversion, rasterization, and upload work shared by a render frame.
More...
#include "donner/svg/renderer/RendererInterface.h"
|
|
void | reset () |
| | Clears aggregate costs, any outstanding measurement reservation, and rejection.
|
|
void | reject () |
| | Latches rejection after an external draw-work failure.
|
|
void | setGradientStopLimitForTesting (std::size_t maximum) |
| | Tightens the gradient-stop cap for a test without raising it.
|
|
bool | reserve (const Cost &cost) |
| | Charges a draw cost, or latches rejection if any aggregate cap is exceeded.
|
| std::optional< PathMeasurementReservation > | reservePathMeasurement () |
| | Reserves all remaining path-measurement work before a bounded query starts.
|
| bool | reconcilePathMeasurement (const PathMeasurementReservation &reservation, std::size_t actualWorkUnits, bool completed) |
| | Reconciles an exclusive path-measurement reservation to work actually consumed.
|
|
std::size_t | drawCalls () const |
| | Draw operations charged in this frame.
|
|
std::size_t | pathCommands () const |
| | Path commands charged in this frame.
|
|
std::size_t | pathMeasurementWorkUnits () const |
| | Path-measurement work charged in this frame.
|
|
std::size_t | gradientStops () const |
| | Gradient stops charged in this frame.
|
|
std::size_t | imageDraws () const |
| | Image draw operations charged in this frame.
|
|
std::uint64_t | imageBytes () const |
| | Image bytes charged in this frame.
|
|
bool | rejected () const |
| | Whether any draw charge or external draw work failed.
|
|
|
static constexpr std::size_t | kMaximumDrawCalls = 64 * 1024 |
| | Maximum draw operations admitted in one frame.
|
|
static constexpr std::size_t | kMaximumPathCommands = 256 * 1024 |
| | Maximum path commands converted or drawn in one frame.
|
|
static constexpr std::size_t | kMaximumPathMeasurementWorkUnits = Path::kMaximumGeometryQueryWork |
| | Maximum cumulative work spent measuring path geometry.
|
|
static constexpr std::size_t | kMaximumGradientStops = 256 * 1024 |
| | Maximum gradient stops processed in one frame.
|
|
static constexpr std::size_t | kMaximumImageDraws = 128 |
| | Maximum image draw operations in one frame.
|
|
static constexpr std::uint64_t | kMaximumImageBytes = 256ULL * 1024 * 1024 |
| | Maximum image bytes admitted for drawing in one frame.
|
Aggregate conversion, rasterization, and upload work shared by a render frame.
◆ donner::svg::RendererDrawBudget::Cost
| struct donner::svg::RendererDrawBudget::Cost |
Work charged to the shared budget by one draw operation or batch.
| Class Members |
|
size_t |
drawCalls = 0 |
Draw operations. |
|
size_t |
gradientStops = 0 |
Gradient stops. |
|
uint64_t |
imageBytes = 0 |
Source-image bytes. |
|
size_t |
imageDraws = 0 |
Image draw operations. |
|
size_t |
pathCommands = 0 |
Path commands. |
|
size_t |
pathMeasurementWorkUnits = 0 |
Geometry-query work units. |
◆ reconcilePathMeasurement()
| bool donner::svg::RendererDrawBudget::reconcilePathMeasurement |
( |
const PathMeasurementReservation & | reservation, |
|
|
std::size_t | actualWorkUnits, |
|
|
bool | completed ) |
|
inlinenodiscard |
Reconciles an exclusive path-measurement reservation to work actually consumed.
An incomplete query consumes its reported work and rejects the aggregate budget.
◆ reservePathMeasurement()
Reserves all remaining path-measurement work before a bounded query starts.
The caller must pass the returned maximum to the query, then call reconcilePathMeasurement with the query's actual work and completion outcome.
The documentation for this class was generated from the following file: