Skip to content

Fix rendering hashes, empty bounds, and script preservation - #24

Merged
CoffeeFlux merged 1 commit into
masterfrom
fix-rendering-inspection
Sep 12, 2026
Merged

Fix rendering hashes, empty bounds, and script preservation#24
CoffeeFlux merged 1 commit into
masterfrom
fix-rendering-inspection

Conversation

@CoffeeFlux

@CoffeeFlux CoffeeFlux commented Sep 12, 2026

Copy link
Copy Markdown
Member

Rendering hashes could miss movement within an unchanged bounding box and depend on the previous contents of the output buffer. Empty frames could also retain a previous visible rectangle.

  • Hash each image’s position, dimensions, color, and complete bitmap rows, excluding stride padding and caller-owned output bytes.
  • Clear empty-frame results while preserving libass’s cached visible result.
  • Preserve Kerning, Language, and LayoutResX/Y in the Aegisub wrapper.
  • Accept LF and CRLF ASS files, with or without a UTF-8 BOM, in the C++ example.

Validation: all three Meson tests pass on macOS arm64 with zlib enabled and disabled. Regression coverage includes reused buffers, unchanged-frame caching, empty scripts, movement within fixed bounds, equal-area drawings with different pixel arrangements, wrapper/native rendering parity, and all four newline/BOM combinations. The new C, wrapper, and newline tests fail against the corresponding original code.

CI: Windows x64, macOS arm64, macOS x86_64, Linux with system dependencies, and Linux without zlib all pass.

Hash values intentionally change with this correction; previously stored hashes should be regenerated.

Opus reviewed fix-rendering-inspection with the prompt: "Please review the fix-rendering-inspection branch. Don't use your code review skill." Its static review found no bugs in the fixes. It did not independently execute the tests; the local and CI results above provide runtime validation. Minor suggestions concerned comments/includes, release-time versioning, and pre-existing example error handling.

@CoffeeFlux
CoffeeFlux merged commit b973a41 into master Sep 12, 2026
5 checks 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