Repository navigation
fix: big-endian bundle contract and Cairo input mutation - #330
Merged
Merged
Conversation
jaromil
marked this pull request as ready for review
November 12, 2026 09:17
Contributor
|
thanks for the fixes. since it christmas appears to be early this year can i wish for more? like: split the PR into multiple commits (separating changes to the filters, the test-suite and the CI changes)? |
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.
RGBA8888 defines channel order in memory.
bundle-api-contractencoded little-endian integer pixels, whileinvert0rused a mask that inverted alpha and left red unchanged on big-endian hosts. Check explicit RGBA bytes across the full frame and invert only the three color bytes.cairogradient,cairoaffineblend, andcairoblendalso premultiplied caller-owned input buffers. Convert into scratch buffers and pack/unpack native-endian Cairo pixels, preserving the existing red/blue convention used by the Cairo color helpers. Keep the tests enabled and add regressions for opaque, translucent, and transparent inputs, repeated rendering, and gradient colors.Add a Debian s390x/QEMU CI job, a cross-compilation toolchain, and setup instructions in
BUILD.md. Referencing the CTest runner as an executable target lets CMake apply the emulator to ordinary plugin tests.Fixes #309.
Fixes #329.
Validation:
bundle-api-contract, cross-compiled for s390x and run withqemu-s390x -L /usr/s390x-linux-gnu, fails with exit 6. The byte-oriented regression also fails against the originalinvert0r; the fixed implementation passes.invert0r, all three affected Cairo plugins, and all three new input contracts.ctest --test-dir build-be-native --output-on-failure -R '^(bundle-api-contract|invert0r|cairo(gradient|affineblend|blend)(-input-contract)?)$'.ctest --test-dir build-be-native --output-on-failure --parallel 4. The two profile tests require unavailable OpenCV development files and fail identically on unchangedorigin/master; both pass in the full CI environment.The Cairo fix uses one temporary frame buffer for
cairogradient/cairoblendand two forcairoaffineblend; allocation failure copies the background through.