struct FrameCapacity
Swift
struct FrameCapacity
Element counts for one frame — used both for "how much fits" and for "how much was written", because those two are compared constantly and one type makes the comparison a line rather than four.
Sources/LavaUI/FrameSink.swift:7
Constructors
init(commands: Int = 0, glyphs: Int = 0, meshVertices: Int = 0, spatialVertices: Int = 0, gradients: Int = 0)
Creates a set of counts, zero by default.
Sources/LavaUI/FrameSink.swift:21
Properties
var commands: Int
Draw commands.
Sources/LavaUI/FrameSink.swift:9
var glyphs: Int
Shaped glyph instances.
Sources/LavaUI/FrameSink.swift:11
var gradients: Int
Gradient descriptors. One per gradient rather than per quad, so this stays small even on a screen full of them.
Sources/LavaUI/FrameSink.swift:18
var meshVertices: Int
2D mesh vertices, for polygons and polylines.
Sources/LavaUI/FrameSink.swift:13
Methods
func fits(_ limit: FrameCapacity) -> Bool
Element-wise "fits inside".
Sources/LavaUI/FrameSink.swift:273