Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodeTextureEncoder::UniformScratch Class Referenceabstract

Interface for callers that pool blit uniform uploads into a per-frame scratch arena instead of creating one uniform buffer per blit. More...

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

Public Member Functions

virtual UniformAllocation allocate (const void *data, uint64_t size, uint64_t alignment)=0
 Copy size bytes of uniform data into the scratch arena and return the borrowed (buffer, offset, size) range for the bind group.

Detailed Description

Interface for callers that pool blit uniform uploads into a per-frame scratch arena instead of creating one uniform buffer per blit.

GeoEncoder implements this over its per-encoder uniform arena, so consecutive image blits and layer composites share one growing buffer (the buffer itself is only created when the arena grows).

Implementation contract (GeoEncoder's arena satisfies all four):

  • The returned buffer carries the Uniform buffer-usage flag.
  • The buffer outlives every command buffer recorded against it in the current frame (retire-then-release, never destroy mid-frame).
  • The range [offset, offset + size) is never rewritten for the rest of the frame once returned.
  • offset honors the requested alignment (at least kUniformOffsetAlignment for blit uniforms).

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