You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Coil's memory cache currently only supports storing Bitmaps. Notably, animated drawables (e.g. AnimatedImageDrawable and MovieDrawable) cannot be stored in the MemoryCache and must be re-decoded for each new image request.
Describe the solution you'd like
Support storing non-bitmap Drawables in MemoryCache.
Additional context
Any solution will likely have to be opt-in since unlike (immutable) Bitmaps, which can be used by multiple targets at the same time, animated drawables are often stateful and can't be used by multiple targets at the same time. This mean we need to remove the drawable from the memory cache when it's in-use and only re-add it once the Target finishes using it. Additionally, parameters like AnimationCallbacks and other listeners will have to be added to the memory cache key.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Coil's memory cache currently only supports storing
Bitmap
s. Notably, animated drawables (e.g.AnimatedImageDrawable
andMovieDrawable
) cannot be stored in theMemoryCache
and must be re-decoded for each new image request.Describe the solution you'd like
Support storing non-bitmap
Drawable
s inMemoryCache
.Additional context
Any solution will likely have to be opt-in since unlike (immutable)
Bitmap
s, which can be used by multiple targets at the same time, animated drawables are often stateful and can't be used by multiple targets at the same time. This mean we need to remove the drawable from the memory cache when it's in-use and only re-add it once theTarget
finishes using it. Additionally, parameters likeAnimationCallbacks
and other listeners will have to be added to the memory cache key.The text was updated successfully, but these errors were encountered: