Top Description Fields Constructors Methods
com.sun.scenario.effect.impl

public Class ImagePool

extends Object
Class Inheritance
Imports
java.lang.ref.SoftReference, java.util.ArrayList, .Iterator, .List, com.sun.scenario.effect.Filterable

A simple object pool used to recycle temporary images used by the various 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.

Field Summary

Modifier and TypeField and Description
private final List<Filterable>
private final List<SoftReference<PoolFilterable>>
pack-priv static long
pack-priv static long
public static long
pack-priv static long
pack-priv static long
pack-priv static final int
private final List<SoftReference<PoolFilterable>>
private final List<SoftReference<PoolFilterable>>
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
ImagePool()

Package-private constructor.

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized PoolFilterable
checkOut(Renderer renderer, int w, int h)

public synchronized void
pack-priv static void
private void
public synchronized void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hardPurgatoryback to summary
private final List<Filterable> hardPurgatory
lockedback to summary
private final List<SoftReference<PoolFilterable>> locked
numAccessedback to summary
pack-priv static long numAccessed
numCreatedback to summary
pack-priv static long numCreated
numEffectsback to summary
public static long numEffects
pixelsAccessedback to summary
pack-priv static long pixelsAccessed
pixelsCreatedback to summary
pack-priv static long pixelsCreated
QUANTback to summary
pack-priv static final int QUANT
softPurgatoryback to summary
private final List<SoftReference<PoolFilterable>> softPurgatory
unlockedback to summary
private final List<SoftReference<PoolFilterable>> unlocked
usePurgatoryback to summary
private final boolean usePurgatory

Constructor Detail

ImagePoolback to summary
pack-priv ImagePool()

Package-private constructor.

Method Detail

checkInback to summary
public synchronized void checkIn(PoolFilterable img)
checkOutback to summary
public synchronized PoolFilterable checkOut(Renderer renderer, int w, int h)
disposeback to summary
public synchronized void dispose()
printStatsback to summary
pack-priv static void printStats()
pruneCacheback to summary
private void pruneCache()
releasePurgatoryback to summary
public synchronized void releasePurgatory()