Skip to content

feat(text): retain bounded raster capacity - #14

Merged
thejustinwalsh merged 2 commits into
feat/text-warm-publicationfrom
feat/text-retained-capacity
Aug 4, 2026
Merged

feat(text): retain bounded raster capacity#14
thejustinwalsh merged 2 commits into
feat/text-warm-publicationfrom
feat/text-retained-capacity

Conversation

@thejustinwalsh

@thejustinwalsh thejustinwalsh commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add deterministic 25% instance-capacity slack, capped at 256 glyphs, to Bitmap, MTSDF, and Slug batches;
  • retain batch, geometry, material, texture, attribute, and backing-array identity for arbitrary glyph replacement that fits compatible capacity and page-run topology;
  • publish authoritative shrink and exact-capacity draw counts, with transactional replacement for overflow or incompatible Bitmap/Slug page runs;
  • coalesce dirty uploads through shared 32-instance buckets, fall back after eight fragmented ranges, and carry renderer-pending ranges into later stages;
  • make React conformance inspect submitted logical instances rather than unused retained-capacity slots;
  • add focused lifecycle regressions, exact package-size evidence, and canonical Milestone 10 documentation.

This is roadmap item 10.3 and is stacked on #13. It does not add renderer-wide batching across independent Text objects.

Verification

  • pnpm --filter @pmndrs/text test — 191 package/integration tests and 6 deterministic fuzz-smoke tests passed;
  • focused retained-capacity suite — Bitmap, MTSDF, and Slug replacement, shrink, exact-capacity growth, abort, overflow disposal, page-run topology, object/buffer identity, and color-only preservation passed;
  • pnpm --filter @pmndrs/text-benchmarks test:unit — 261 tests passed;
  • pnpm --filter @pmndrs/text-benchmarks test:headless — all 19 conformance cases pass, including React reconciliation with retained capacity;
  • pnpm --filter @pmndrs/text-benchmarks check:size — exact report and reviewed ceilings passed;
  • pnpm --filter @pmndrs/text-benchmarks check:autoresearch-baseline passed;
  • repository typecheck, lint, format, and pnpm docs:check passed with zero OKF errors or warnings.

Browser core, baker hosts, and Wasm artifacts remain byte-identical. Relative to #13, optional Bitmap, MTSDF, and Slug closures grow by 598, 762, and 1,204 Brotli bytes respectively and remain under existing absolute budgets.

@thejustinwalsh
thejustinwalsh force-pushed the feat/text-retained-capacity branch from 44f91e2 to 2245948 Compare August 4, 2026 01:44
@thejustinwalsh
thejustinwalsh merged commit 8c172a2 into main Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant