nx_paint_solid_rect.nx -- fill a rectangle of pixels in a
caller-supplied framebuffer with a solid RGBA color. Phase 4 first
primitive of NISHI_BROWSER_ROADMAP -- bridges Phase 3 layout
(assigns x/y/w/h per box) to actual pixel output.
Framebuffer layout: row-major RGBA u8 quads.
pixels[(y * width + x) * 4 + 0] = R
pixels[(y * width + x) * 4 + 1] = G
pixels[(y * width + x) * 4 + 2] = B
pixels[(y * width + x) * 4 + 3] = A
Caller-owns-memory contract: the Framebuffer struct points at a
pre-allocated pixel array of width * height * 4 bytes.
Clipping: rectangles outside the framebuffer bounds are clipped to
the visible region; out-of-bounds writes never happen. Zero-area
rectangles are silently skipped.
What it does NOT handle yet (Phase 4b queued):
- alpha blending (currently overwrites destination -- assumes
opaque foreground; transparent fills via this primitive will
paint solid black behind transparent areas, wrong for layered
elements). Composes with future nx_paint_blend.
- sub-pixel positioning (integer-pixel only)
- anti-aliased edges (Phase 4b after sub-pixel)
- clip-rect stacking for overflow:hidden
- SIMD acceleration (Phase 4c when nx_simd lands)
Per cardinal feedback-honest-perf-verdict-no-aspirational-claims:
gap list is EXACT.
genealogy_id: substrate_browser_phase_4_paint_seed +
classical_2d_rect_fill
lineage_id: nishi_browser_paint_solid_rect_v1
nx_safety_envelope:
intended_use: "Solid rect fill -- browser paint substrate"
sil_target: SIL1
evidence: [bounded_pixel_loop,
explicit_clipping,
dependencies 2 imports · 37 importers
diagram shows first 10 each side; +0 more imports, +27 more importers in the complete lists below.