Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::SnapshotReadbackResources Struct Reference

Move-only resource set for one GPU snapshot unpremultiply readback: a straight-alpha staging texture, its view, and a map-readable readback buffer. More...

#include "donner/svg/renderer/geode/GeodeDevice.h"

Public Member Functions

bool empty () const
 True when any required handle is missing; an empty set cannot be used.

Public Attributes

gpu::Texture staging
 Staging texture the compute pass writes the unpremultiplied result into.
gpu::TextureView stagingView
 View of staging, kept with the pooled entry so it is created once.
gpu::Buffer readback
 Map-readable buffer the staging texture is copied into.
uint32_t width = 0
 Pool key: staging texture width in pixels.
uint32_t height = 0
 Pool key: staging texture height in pixels.

Detailed Description

Move-only resource set for one GPU snapshot unpremultiply readback: a straight-alpha staging texture, its view, and a map-readable readback buffer.

Acquired from and returned to the per-device pool keyed by size, so repeat snapshots at the same dimensions allocate nothing. The pool is bounded with least-recently-used eviction, so a caller walking many distinct sizes (for example a window resize) cannot pin unbounded staging memory for the device's lifetime.


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