pub struct RenderFrame {
pub atlas_dirty: bool,
pub atlas_width: u32,
pub atlas_height: u32,
pub atlas_pixels: Vec<u8>,
pub glyphs: Vec<GlyphQuad>,
pub images: Vec<ImageQuad>,
pub decorations: Vec<DecorationRect>,
/* private fields */
}Expand description
Everything needed to draw one frame.
Produced by crate::Typesetter::render. Contains glyph quads (textured rectangles
from the atlas), inline image placeholders, and decoration rectangles
(selections, cursor, underlines, table borders, etc.).
The adapter draws the frame in three passes:
- Upload
atlas_pixelsas a GPU texture (only whenatlas_dirtyis true). - Draw each
GlyphQuadas a textured rectangle from the atlas. - Draw each
DecorationRectas a colored rectangle.
Fields§
§atlas_dirty: boolTrue if the atlas texture changed since the last frame (needs re-upload).
atlas_width: u32Atlas texture width in pixels.
atlas_height: u32Atlas texture height in pixels.
atlas_pixels: Vec<u8>RGBA pixel data, row-major. Length = atlas_width * atlas_height * 4.
glyphs: Vec<GlyphQuad>One textured rectangle per visible glyph.
images: Vec<ImageQuad>Inline image placeholders. The adapter loads the actual image data
(e.g., via TextDocument::resource(name)) and draws it at the given
screen position.
decorations: Vec<DecorationRect>Decoration rectangles: selections, cursor, underlines, strikeouts, overlines, backgrounds, table borders, and cell backgrounds.