Aggregate budget for render targets, layers, masks, clips, and pattern tiles.
More...
#include "donner/svg/renderer/RendererInterface.h"
|
| struct | Limits |
| | Per-frame limits, including any tighter limits installed by a test. More...
|
|
|
void | reset () |
| | Clears usage counters and the sticky rejection state for a new frame.
|
|
bool | reserve (int width, int height, std::size_t surfaceCount=1, std::uint64_t bytesPerPixel=4) |
| | Reserves matching surfaces; invalid dimensions or exhausted capacity latch rejection.
|
| bool | canReserveBytes (std::uint64_t bytes, std::size_t surfaces) const |
| | Tests additional capacity without changing counters or latching a rejection.
|
|
bool | release (int width, int height, std::size_t surfaceCount=1, std::uint64_t bytesPerPixel=4) |
| | Releases surfaces after their last submitted GPU use, restoring active-capacity accounting.
|
|
std::uint64_t | bytes () const |
| | Bytes currently reserved by active surfaces.
|
|
Limits | limits () const |
| | The frame's limits, including any tighter limits a test installed.
|
|
std::uint64_t | peakBytes () const |
| | Most bytes reserved at once since the last Reset.
|
|
std::size_t | surfaces () const |
| | Number of active reserved surfaces.
|
|
bool | rejected () const |
| | Whether a reservation or release has failed in this frame.
|
|
std::uint64_t | refusedRequestBytes () const |
| | Bytes the reservation that latched this frame's refusal asked for (saturated when the request alone overflows the limit), or zero when no byte limit refused it.
|
|
std::uint64_t | limitBytes () const |
| | The aggregate byte limit.
|
|
void | setLimitsForTesting (Limits limits) |
| | Tightens limits for a test without raising an existing limit.
|
|
void | replaceLimitsWithinDefaultsForTesting (Limits limits) |
| | Sets the limits for a test to limits, clamped to the production defaults: unlike setLimitsForTesting it may raise a limit a test lowered earlier, but never above kMaximumBytes or kMaximumSurfaces.
|
|
|
static constexpr std::uint64_t | kMaximumBytes = 256ULL * 1024 * 1024 |
| | Default upper bound on aggregate surface storage.
|
|
static constexpr std::size_t | kMaximumSurfaces = 256 |
| | Default upper bound on concurrently reserved surfaces.
|
Aggregate budget for render targets, layers, masks, clips, and pattern tiles.
◆ donner::svg::RendererSurfaceBudget::Limits
| struct donner::svg::RendererSurfaceBudget::Limits |
Per-frame limits, including any tighter limits installed by a test.
◆ canReserveBytes()
| bool donner::svg::RendererSurfaceBudget::canReserveBytes |
( |
std::uint64_t | bytes, |
|
|
std::size_t | surfaces ) const |
|
inlinenodiscard |
Tests additional capacity without changing counters or latching a rejection.
- Parameters
-
| bytes | Additional allocation bytes. |
| surfaces | Additional texture count. |
The documentation for this class was generated from the following file: