mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #2249] dds_png: compress scanlines without staging the entire image #2252
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2252
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2249
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:codex/dds-png-bounded-scanlines📝 Commits (1)
a9ec081dds_png: compress scanlines without staging the entire image📊 Changes
2 files changed (+26 additions, -11 deletions)
View changed files
📝
tests/test_dds_png.py(+17 -0)📝
tools/dds_png.py(+9 -11)📄 Description
Claimed in the coordination issue as: DDS-PNG-BOUNDED-SCANLINES
What and why
Feed PNG filter bytes and RGBA rows to one zlib compressor incrementally. A 1024×1024 zero-filled synthetic texture on Windows reduced peak allocations measured by tracemalloc after source allocation from 4,579,376 to 384,418 bytes. Existing tests also decode and compare the image data.
Tested
Windows, Python 3.14.7. The regression failed on the parent commit and passed with this change.
python -I tests/test_dds_png.pypython -I tests/test_dds_subresources.pypython -I tests/test_dds_png_dx10.pygit diff --checkand the changed-path no-game-data scan passed.GPUs tested: N/A (synthetic CPU tests).
AI-assisted: Yes.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.