feat(export)!: replace on-screen bitmap capture with headless PNG exporter - #132
Open
akshay2211 wants to merge 1 commit into
Open
feat(export)!: replace on-screen bitmap capture with headless PNG exporter#132akshay2211 wants to merge 1 commit into
akshay2211 wants to merge 1 commit into
Conversation
…orter Remove the legacy screen-capture PNG route and promote the headless raster exporter as the sole PNG path. Removed (BREAKING): - DrawBoxController.saveBitmap() - Event.PngSaved / Intent.SaveBitmap - capturePending/captureLayer machinery + State.invokeBitmap in DrawBox Added / promoted: - DrawBoxController.exportPng(scale, background, textMeasurer) -> Event.PngExported(bytes) - PngExporter + per-platform PngEncoder (renders state.elements off-screen via the SDK's real renderElement, then encodes to PNG bytes) Sample app: onDownloadPng now calls exportPng(...) and ImageSaver.savePng takes ByteArray (writes the already-encoded bytes directly, no re-encode). Docs: migration guide section, CHANGELOG, README, and the api-reference / faq / features / architecture pages updated. Warrants a 3.0.0 release. (cherry picked from commit 04999a7)
akshay2211
force-pushed
the
feat/headless-bitmap
branch
from
July 29, 2026 16:54
d2f0134 to
a063cd6
Compare
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.
Remove the legacy screen-capture PNG route and promote the headless raster exporter as the sole PNG path.
Removed (BREAKING):
Added / promoted:
Sample app: onDownloadPng now calls exportPng(...) and ImageSaver.savePng takes ByteArray (writes the already-encoded bytes directly, no re-encode).
Docs: migration guide section, CHANGELOG, README, and the api-reference / faq / features / architecture pages updated. Warrants a 3.0.0 release.
(cherry picked from commit 04999a7)
Summary
Type of change
Affected targets
Public API impact
2.xfrozen surface — link to RFC or discussion:Testing
Checks
./gradlew :DrawBox:spotlessCheckpasses./gradlew :DrawBox:jvmTestpasses./gradlew :DrawBox:dokkaGenerateHtmlpassesScreenshots / recording
Linked issues