public class ImagePool
extends java.lang.Object
EffectPeer
implementations. Image allocation can be
a fairly expensive operation (in terms of footprint and performance),
especially for the GPU backends, so image reuse is critical.Modifier and Type | Field and Description |
---|---|
private java.util.List<Filterable> |
hardPurgatory |
private java.util.List<java.lang.ref.SoftReference<PoolFilterable>> |
locked |
(package private) static long |
numAccessed |
(package private) static long |
numCreated |
static long |
numEffects |
(package private) static long |
pixelsAccessed |
(package private) static long |
pixelsCreated |
(package private) static int |
QUANT |
private java.util.List<java.lang.ref.SoftReference<PoolFilterable>> |
softPurgatory |
private java.util.List<java.lang.ref.SoftReference<PoolFilterable>> |
unlocked |
private boolean |
usePurgatory |
Constructor and Description |
---|
ImagePool()
Package-private constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkIn(PoolFilterable img) |
PoolFilterable |
checkOut(Renderer renderer,
int w,
int h) |
void |
dispose() |
(package private) static void |
printStats() |
private void |
pruneCache() |
void |
releasePurgatory() |
public static long numEffects
static long numCreated
static long pixelsCreated
static long numAccessed
static long pixelsAccessed
static final int QUANT
private final java.util.List<java.lang.ref.SoftReference<PoolFilterable>> unlocked
private final java.util.List<java.lang.ref.SoftReference<PoolFilterable>> locked
private final boolean usePurgatory
private final java.util.List<Filterable> hardPurgatory
private final java.util.List<java.lang.ref.SoftReference<PoolFilterable>> softPurgatory
static void printStats()
public PoolFilterable checkOut(Renderer renderer, int w, int h)
public void checkIn(PoolFilterable img)
public void releasePurgatory()
private void pruneCache()
public void dispose()