Use tiled decoding when webtoon images cannot use hardware bitmaps - #3771
Open
rodrigdoliveira wants to merge 1 commit into
Open
Use tiled decoding when webtoon images cannot use hardware bitmaps#3771rodrigdoliveira wants to merge 1 commit into
rodrigdoliveira wants to merge 1 commit into
Conversation
rodrigdoliveira
marked this pull request as ready for review
August 15, 2026 13:53
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.
Summary
Problem
The default Long strip path asks Coil to prepare one complete bitmap before passing it to the reader view. A hardware bitmap stores its pixels in Android's graphics memory and is the fast path used when the image and device support it.
When
ImageUtil.canUseHardwareBitmap()returns false, the current Long strip path still prepares the complete image as a regular bitmap. Exceptionally tall pages can make that allocation expensive or fail on device-specific decoder and memory limits.Mihon already has a second path that gives the image stream directly to
SubsamplingScaleImageView. That path reads smaller sections of the image as needed instead of requiring the complete decoded bitmap up front. It is currently used for paged reading and when the user enables the legacy Long strip decoder preference.Change
The reader now checks hardware-bitmap eligibility before selecting the Long strip decoder:
Validation
./gradlew spotlessCheck./gradlew :app:testDebugUnitTestThe unchanged build also completed the controlled local test because the reported failure is intermittent. The device trace demonstrates that this change selects the intended decoder without changing normal output; it does not claim that every blank Long strip page has the same cause.
Related context: #2898