< prev index next >
src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java
Print this page
*** 396,407 ****
public void initSolidLoops() {
this.solidloops = getSolidLoops(getSurfaceType());
}
private static final int CACHE_SIZE = 5;
! private static RenderLoops loopcache[] = new RenderLoops[CACHE_SIZE];
! private static SurfaceType typecache[] = new SurfaceType[CACHE_SIZE];
public static synchronized RenderLoops getSolidLoops(SurfaceType type) {
for (int i = CACHE_SIZE - 1; i >= 0; i--) {
SurfaceType t = typecache[i];
if (t == type) {
return loopcache[i];
--- 396,407 ----
public void initSolidLoops() {
this.solidloops = getSolidLoops(getSurfaceType());
}
private static final int CACHE_SIZE = 5;
! private static RenderLoops[] loopcache = new RenderLoops[CACHE_SIZE];
! private static SurfaceType[] typecache = new SurfaceType[CACHE_SIZE];
public static synchronized RenderLoops getSolidLoops(SurfaceType type) {
for (int i = CACHE_SIZE - 1; i >= 0; i--) {
SurfaceType t = typecache[i];
if (t == type) {
return loopcache[i];
< prev index next >