TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::ImageBatcher Class Reference

#include <gui_core/graphics/gui_image_batcher.h>

Classes

struct  Batch
 A run of a draw's primitives, and the images it reads. More...

Public Member Functions

void SetStyles (std::span< const VisualColorStyle > colorStyles, std::span< const VisualBoxStyle > boxStyles)
 The styles the frame's draws use, as uploaded: the color styles' gradient pages are their image slots (PrepareFrame resolves them).
void Split (PrimitiveKind kind, std::span< const std::byte > primitives, uint32_t firstPrimitive, uint32_t maxImages, std::vector< Batch > &out) const
 Cuts a draw of kind: primitives are its primitives' bytes, from firstPrimitive.

Static Public Attributes

static constexpr uint32_t kMaxImages = 16
 The most images a batch holds.

Member Function Documentation

◆ SetStyles()

void tachyon::ImageBatcher::SetStyles ( std::span< const VisualColorStyle > colorStyles,
std::span< const VisualBoxStyle > boxStyles )

The styles the frame's draws use, as uploaded: the color styles' gradient pages are their image slots (PrepareFrame resolves them).

◆ Split()

void tachyon::ImageBatcher::Split ( PrimitiveKind kind,
std::span< const std::byte > primitives,
uint32_t firstPrimitive,
uint32_t maxImages,
std::vector< Batch > & out ) const

Cuts a draw of kind: primitives are its primitives' bytes, from firstPrimitive.

Appends runs that read at most maxImages images each (kMaxImages at most). A primitive that alone reads more keeps the first maxImages.

Member Data Documentation

◆ kMaxImages

uint32_t tachyon::ImageBatcher::kMaxImages = 16
staticconstexpr

The most images a batch holds.


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