Skip to main content

smudge_cpu/
lib.rs

1//! CPU rasterizer that keeps a persistent pixmap and repaints only the damaged
2//! regions of each frame.
3//!
4//! The rasterizer replays a display list into a premultiplied RGBA surface that
5//! survives between frames, so untouched pixels cost nothing. Each damaged
6//! rectangle is cleared and redrawn in place, with drawing clipped to it.
7//! Glyphs are drawn from a cache of alpha masks that rasterizes each glyph
8//! once per size and subpixel phase. Offset scopes in the display list move
9//! the operations and clips they wrap.
10//!
11//! Redrawing a rectangle on its own produces the same pixels as a full
12//! repaint, because each pixel's coverage is computed from its absolute
13//! position and the shape covering it, not from the area being drawn.
14
15#![forbid(unsafe_code)]
16
17mod draw;
18mod glyph_cache;
19mod renderer;
20
21pub use renderer::CpuRenderer;