src/java.desktop/share/classes/sun/awt/image/BufImgSurfaceData.java
changeset 52248 2e330da7cbf4
parent 49694 69f7e3ed043c
equal deleted inserted replaced
52247:f775f83d6b60 52248:2e330da7cbf4
   396     public void initSolidLoops() {
   396     public void initSolidLoops() {
   397         this.solidloops = getSolidLoops(getSurfaceType());
   397         this.solidloops = getSolidLoops(getSurfaceType());
   398     }
   398     }
   399 
   399 
   400     private static final int CACHE_SIZE = 5;
   400     private static final int CACHE_SIZE = 5;
   401     private static RenderLoops loopcache[] = new RenderLoops[CACHE_SIZE];
   401     private static RenderLoops[] loopcache = new RenderLoops[CACHE_SIZE];
   402     private static SurfaceType typecache[] = new SurfaceType[CACHE_SIZE];
   402     private static SurfaceType[] typecache = new SurfaceType[CACHE_SIZE];
   403     public static synchronized RenderLoops getSolidLoops(SurfaceType type) {
   403     public static synchronized RenderLoops getSolidLoops(SurfaceType type) {
   404         for (int i = CACHE_SIZE - 1; i >= 0; i--) {
   404         for (int i = CACHE_SIZE - 1; i >= 0; i--) {
   405             SurfaceType t = typecache[i];
   405             SurfaceType t = typecache[i];
   406             if (t == type) {
   406             if (t == type) {
   407                 return loopcache[i];
   407                 return loopcache[i];