Skip to main content

Module tile

Module tile 

Source
Expand description

64×64 render-tile iterator (rayon-ready; serial driver only this run). 64×64 render-tile iterator.

Splits the framebuffer into a grid of TILE_SIZE × TILE_SIZE tiles, clamped to the framebuffer boundary. Tiles are independent of each other and can be rendered in parallel (rayon-ready); this run uses a serial driver.

Structs§

DirtyRegion
Tracks which tiles of the framebuffer have been modified since the last clear, enabling callers to skip re-compositing unchanged tiles.
Tile
A single render tile, identified by its top-left corner and its pixel extents (which may be smaller than DEFAULT_TILE_SIZE at boundaries).
TileIter
Iterator over the tiles covering a ClipRect, clamped to the framebuffer size.

Constants§

DEFAULT_TILE_SIZE
Default tile side length in pixels.

Functions§

collect_tiles
Collect all tiles covering rect into an owned Vec<Tile>.
render_tiles
Apply closure f to each tile covering rect.
tiles_for
Return an iterator over DEFAULT_TILE_SIZE-sized tiles covering rect, clamped to the framebuffer dimensions fb_w × fb_h.