Repository navigation
fix(ecs): preserve atlas and image resources across lifecycle transitions - #387
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failed glyph-atlas rebuilds destroyed the old texture and published incomplete cache data. Late image decodes could overwrite newer bitmaps, and empty batches could reuse the wrong renderer combination: for example, a retired shadow/fill rectangle batch could be reused for fill/dashed-stroke rendering merely because both contained two drawcalls.
This change keeps atlas map/packing/texture updates together until upload succeeds, releases failed uploads, and makes teardown idempotent. It also fixes multiline origins, the default glyph scale, and bitmap kerning placement. Image decoding now preserves explicit replacements, closes obsolete results, retries synchronous adapter failures, and ignores disabled fill layers when resolving raster options. Batch reuse checks each renderer constructor, and removed/cleared UI drawcalls no longer reappear when restoring the frame queue.
Adds 68 behavioral unit tests and independent coverage gates for GlyphManager, image URL raster caching, and BatchManager. Atlas tests exercise real packing with controlled raster/GPU inputs; image tests use native Cairo pixels and explicitly completed decode promises; batch tests use actual drawcall classes and validation, with GPU/graph boundaries substituted. Existing browser regressions separately verify rendered output. All ECS source files remain included in coverage.
Validation:
git diff --checkpassed.Baseline is merged master
8d4ffbba(PR #386). Metrics are from local full-package reports; Coveralls updates after merge and CI.docs/ecs-test-coverage.mdrecords counts, gates, reproduction commands, and the next text/icon/effect property-synchronization priorities. Includes an ECS patch changeset; no package publication.