Expand description
The encoded-paint records the fragment shader samples, and the
Rgba32Uint texture they are serialized into.
Each record is 16-byte aligned so it starts on a texel boundary; records are written back to back, and a paint’s index into the texture is the texel it starts at. Sizes are part of the shader contract — a record that grew or shrank would shift every paint after it — so each carries a compile-time size assertion.
Structs§
- GpuBlurred
Rounded Rect - An encoded blurred rounded rectangle paint.
- GpuEncoded
Image - An encoded image paint.
- GpuLinear
Gradient - An encoded linear gradient paint.
- GpuRadial
Gradient - An encoded radial gradient paint.
- GpuSweep
Gradient - An encoded sweep gradient paint.
Enums§
- GpuEncoded
Paint - One encoded paint of any kind.
Functions§
- encoded_
paints_ texture_ descriptor - The descriptor for an encoded-paint texture of
widthxheighttexels. - encoded_
paints_ texture_ height - The encoded-paint texture height needed to hold
texelsrecords’ worth of texels in a textureresource_texture_dimtexels wide. - grow_
encoded_ paints_ texture_ height - The height an encoded-paint texture currently
current_heighttall must be recreated at to holdtexelstexels, orNonewhen the existing texture already fits. - lower_
encoded_ paint - Lower one
vello_commonencoded paint into the record the strip shader samples, orNonewhen the engine cannot resolve it yet. - pack_
kind_ and_ f_ is_ swapped - Packs a radial gradient’s kind (bits 0-1,
0radial /1strip /2focal) and focal-swap flag (bit 2) into one word. - pack_
texture_ width_ and_ extend_ mode - Packs a gradient texture’s width (bits 0-29) and extend mode (bits 30-31,
0pad /1repeat /2reflect) into one word. - unpack_
texture_ width_ and_ extend_ mode - The texture width and extend mode packed by
pack_texture_width_and_extend_mode.