bumptech / glide

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

Glide transformation drop gainmap and colorspace #5333

Closed falhassen closed 8 months ago

falhassen commented 9 months ago

This is because LruBitmapPool can recycle Bitmaps with no gainmaps and a different colorspace.

Since gainmaps can't be reused between bitmaps, and must be set manually, either we have to do a BitmapPool API change to handle that, or all callers of BitmapPool have to handle it explicitly, or we start migrating from BitmapPool, since it is arguably not needed in Android M+ since the Android framework takes care of Bitmap reuse anyway.

falhassen commented 8 months ago

Note that this fix is opt-in now via a Glide flag, GlideBuilder#setPreserveGainmapAndColorSpaceForTransformations.

Once we have confidence in the fix, we can clean-up the flag and default the behavior to true.