LruBitmapPool

open class LruBitmapPool : BitmapPool

An com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool implementation that uses an com.bumptech.glide.load.engine.bitmap_recycle.LruPoolStrategy to bucket Bitmaps and then uses an LRU eviction policy to evict android.graphics.Bitmaps from the least recently used bucket in order to keep the pool below a given maximum size limit.

Constructors

Link copied to clipboard
open fun LruBitmapPool(maxSize: Long)
Constructor for LruBitmapPool.
Link copied to clipboard
open fun LruBitmapPool(maxSize: Long, allowedConfigs: Set<Config>)
Constructor for LruBitmapPool.

Functions

Link copied to clipboard
open fun clearMemory()
Removes all android.graphics.
Link copied to clipboard
open fun evictionCount(): Long
Returns the number of bitmaps that have been evicted from the pool.
Link copied to clipboard
open fun get(    width: Int,     height: Int,     config: Config): Bitmap
Returns a android.graphics.
Link copied to clipboard
open fun getDirty(    width: Int,     height: Int,     config: Config): Bitmap
Identical to get except that any returned android.graphics.
Link copied to clipboard
open fun hitCount(): Long
Returns the number of cache hits for bitmaps in the pool.
Link copied to clipboard
open fun missCount(): Long
Returns the number of cache misses for bitmaps in the pool.
Link copied to clipboard
open fun put(bitmap: Bitmap)
Adds the given android.graphics.
Link copied to clipboard
open fun setSizeMultiplier(sizeMultiplier: Float)
Multiplies the initial size of the pool by the given multiplier to dynamically and synchronously allow users to adjust the size of the pool.
Link copied to clipboard
open fun trimMemory(level: Int)
Reduces the size of the cache by evicting items based on the given level.

Properties

Link copied to clipboard
open val currentSize: Long
Link copied to clipboard
open val maxSize: Long