Skip to content

Preallocate bitmap when decoding software bitmap.#354

Merged
colinrtwhite merged 1 commit into
masterfrom
colin/preallocate_bitmap
Apr 9, 2020
Merged

Preallocate bitmap when decoding software bitmap.#354
colinrtwhite merged 1 commit into
masterfrom
colin/preallocate_bitmap

Conversation

@colinrtwhite
Copy link
Copy Markdown
Member

This should greatly improve the bitmap pool hit rate if decoding subsequent images that are exactly the same size.

According to my benchmarks preallocating vs. letting BitmapFactory allocate the bitmap has no performance difference.

@colinrtwhite colinrtwhite merged commit 8aa1dbf into master Apr 9, 2020
@colinrtwhite colinrtwhite deleted the colin/preallocate_bitmap branch April 9, 2020 03:24
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.

1 participant