Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert bitmap to HARDWARE config #3

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

wwww-wwww
Copy link

@wwww-wwww wwww-wwww commented Apr 18, 2024

Seems to improve performance of long images

@arkon arkon merged commit e620608 into tachiyomiorg:main Apr 18, 2024
2 checks passed
@FooIbar
Copy link

FooIbar commented Apr 19, 2024

It does improve performance, but not for long images :P.
FooIbar/EhViewer#732

val bitmap = decoder?.decode(sRect, sampleSize)
var bitmap = decoder?.decode(sRect, sampleSize)
if (Build.VERSION.SDK_INT >= 26) {
bitmap = bitmap?.copy(Bitmap.Config.HARDWARE, false)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fallback to software bitmap if the copy fails.

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.

3 participants