Skip to main content

Module canvas

Module canvas 

Source

Structs§

Color
An RGBA color value.
GlyphQuad
One glyph headed for the compositor’s atlas (D109 Step 4): position and color per frame; bitmap is the shared cached rasterization, read only on the atlas’s first sight of key.
ImagePixels
Shared image pixels headed for the compositor’s texture cache. The newtype keeps CanvasFrameItem’s derives sane: Debug prints the length (never megabytes of bytes), equality compares Arc identity — the content-derived key is what real image equality is judged by.
ShaderQuadCmd
One collected DrawCommand::ShaderFill, in PHYSICAL pixels, ready for the compositor. clip is the widget clip stack’s intersection at record time (physical px, x/y/w/h), independent of any damage clip.
SkiaCanvas
ROSACE’s 2D drawing canvas backed by tiny-skia.

Enums§

CanvasFrameItem
One item of a GPU-mode frame, in z-order (D109 C1): a GPU shape quad, a CPU-rasterized segment (bbox-sized premultiplied-RGBA buffer cut out of the scratch pixmap), a batch of atlas glyphs (Step 4), or an image drawn from the compositor’s texture cache (uploaded on first sight of key).

Functions§

blit_key
Content-derived identity for a blit source (D109 image textures): FNV over dims, length, and three 32-byte windows. Cheap enough per frame; dims+len in the hash make collisions between real UI images astronomically unlikely, and unlike Arc pointer identity it can’t suffer ABA when a cache entry is dropped and reallocated.
text_gamma_lut
The text-AA gamma curve as a 256-entry LUT (D109 Step 4): the CPU blit path applies it per pixel at blend time; the GPU atlas applies it ONCE at upload so the glyph shader is a pure sample×color. Exposed so the platform hands the compositor gamma’d bytes without the Layer-0 compositor needing this crate.