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

Use software bitmap if target size exceeds max texture size #2211

Open
FooIbar opened this issue Apr 18, 2024 · 2 comments
Open

Use software bitmap if target size exceeds max texture size #2211

FooIbar opened this issue Apr 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@FooIbar
Copy link

FooIbar commented Apr 18, 2024

Is your feature request related to a problem? Please describe.
It may fail if the bitmap's dimension exceeds the maximum texture size when creating a hardware bitmap.
https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/jni/ImageDecoder.cpp;l=492;drc=fff1a293e380ed87258f741475574eb37f77fe4f

Describe the solution you'd like
Use software bitmap instead if the target size exceeds the maximum texture size, the limit could be an option or automatically calculated.

@FooIbar FooIbar added the enhancement New feature or request label Apr 18, 2024
@colinrtwhite
Copy link
Member

Do you know if we can get the maximum texture size? I think it might be a hidden implementation detail.

@FooIbar
Copy link
Author

FooIbar commented Apr 22, 2024

I believe it can be retrieved from getMaximumBitmapHeight() on a hardware canvas or EGL configurations.
I think it's fine to leave it to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants