Movable ownership of one cached geometry reservation.
More...
#include "donner/svg/renderer/geode/GeodeResourceBudget.h"
|
|
| GeodeGeometryCacheReservation (const GeodeGeometryCacheReservation &)=delete |
|
GeodeGeometryCacheReservation & | operator= (const GeodeGeometryCacheReservation &)=delete |
| | GeodeGeometryCacheReservation (GeodeGeometryCacheReservation &&other) noexcept |
| | Transfer ownership of a cache reservation without changing its charge.
|
| GeodeGeometryCacheReservation & | operator= (GeodeGeometryCacheReservation &&other) noexcept |
| | Release the current reservation and take ownership of another.
|
| bool | replace (std::shared_ptr< GeodeDocumentGeometryBudget > budget, std::uint64_t bytes) |
| | Atomically replace the owned cache reservation with a new budget and byte count.
|
|
void | reset () |
| | Release the owned cache charge and forget its budget.
|
|
std::uint64_t | bytes () const |
| | Cache bytes charged by this reservation.
|
Movable ownership of one cached geometry reservation.
◆ GeodeGeometryCacheReservation()
| donner::geode::GeodeGeometryCacheReservation::GeodeGeometryCacheReservation |
( |
GeodeGeometryCacheReservation && | other | ) |
|
|
inlinenoexcept |
Transfer ownership of a cache reservation without changing its charge.
- Parameters
-
| other | Reservation to move into this object. |
◆ operator=()
| GeodeGeometryCacheReservation & donner::geode::GeodeGeometryCacheReservation::operator= |
( |
GeodeGeometryCacheReservation && | other | ) |
|
|
inlinenoexcept |
Release the current reservation and take ownership of another.
- Parameters
-
| other | Reservation to move into this object. |
- Returns
- This reservation after the transfer.
◆ replace()
| bool donner::geode::GeodeGeometryCacheReservation::replace |
( |
std::shared_ptr< GeodeDocumentGeometryBudget > | budget, |
|
|
std::uint64_t | bytes ) |
|
inlinenodiscard |
Atomically replace the owned cache reservation with a new budget and byte count.
- Parameters
-
| budget | Document budget that will own the replacement charge. |
| bytes | Cache bytes requested from that budget. |
- Returns
- False if the replacement cannot be reserved; the old charge remains owned.
The documentation for this class was generated from the following file: