|
TachyonUI 1.1.0
High-performance UI for building tools.
|
#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. | |
| 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).
| 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.
|
staticconstexpr |
The most images a batch holds.