bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.67k stars 6.12k forks source link

Clean up preserveGainmapAndColorSpaceForTransformations flag #5366

Closed falhassen closed 9 months ago

falhassen commented 9 months ago

This is almost a pure clean-up, with only one notable difference.

The new code path changed the behavior of rotateImageExif, which in the old path forced a non-null config of ARGB_8888 for bitmaps with null configs. In order to reuse bitmaps using Bitmap.reconfigure, a non-null config is required (see https://github.com/bumptech/glide/issues/194). A null config can be due to a non-public bitmap type as documented in that issue.

The new flow removes the need to reconfigure a bitmap, and thus should do a better job of preserving the config and not forcing it to ARGB_8888.

Thus, I had to change one unit test that tested this behavior being exercised in BitmapPool.

falhassen commented 9 months ago

Clean up for https://github.com/bumptech/glide/issues/5333