Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::geode::GeodeGradientRamp Struct Reference

A gradient's stops laid out in a stop ramp texture (see stopRamp in donner/gpu/shader/programs/SlugGradientSource.h). More...

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

Public Member Functions

 GeodeGradientRamp (const GeodeGradientRamp &)=delete
GeodeGradientRamp & operator= (const GeodeGradientRamp &)=delete
std::uint64_t retainedBytes () const
 Bytes keeping this ramp across frames costs: the texture and the stop key's storage.

Public Attributes

std::vector< float > stops
 The stops it holds: per stop, the offset then straight-alpha RGBA. Draws compare their own stops with it byte for byte before they bind the ramp, so two gradients never share one unless their stops are identical.
gpu::Texture texture
 RGBA32Float ramp.
gpu::TextureView view
 View the gradient bind groups bind.
std::uint64_t textureBytes = 0
 Bytes of texture.
std::shared_ptr< GeodeDocumentGeometryBudget > chargedBudget
 The document budget a resident slot charged when it first kept this ramp across frames, and the bytes charged: the texture and the stop key, once for every slot that shares the ramp. Null while only this frame's draws hold it. Released when the last holder lets go, which for a slot is at the frame boundary after it drops the ramp.
std::uint64_t chargedBytes = 0
 Bytes charged to chargedBudget.

Detailed Description

A gradient's stops laid out in a stop ramp texture (see stopRamp in donner/gpu/shader/programs/SlugGradientSource.h).

Draws and resident slots of gradients with the same stops share one.


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