src/solaris/classes/sun/font/XRGlyphCache.java

Print this page

        

*** 188,211 **** ArrayList<XRGlyphCacheEntry> grayGlyphs = null; for (XRGlyphCacheEntry cacheEntry : glyphList) { if (cacheEntry.isGrayscale(containsLCDGlyphs)) { if (grayGlyphs == null) { ! grayGlyphs = new ArrayList<XRGlyphCacheEntry>(glyphList.size()); } cacheEntry.setGlyphSet(grayGlyphSet); grayGlyphs.add(cacheEntry); } else { if (lcdGlyphs == null) { ! lcdGlyphs = new ArrayList<XRGlyphCacheEntry>(glyphList.size()); } cacheEntry.setGlyphSet(lcdGlyphSet); lcdGlyphs.add(cacheEntry); } } ! ! return new List[] { grayGlyphs, lcdGlyphs }; } /** * Copies the glyph-images into a continous buffer, required for uploading. */ --- 188,214 ---- ArrayList<XRGlyphCacheEntry> grayGlyphs = null; for (XRGlyphCacheEntry cacheEntry : glyphList) { if (cacheEntry.isGrayscale(containsLCDGlyphs)) { if (grayGlyphs == null) { ! grayGlyphs = new ArrayList<>(glyphList.size()); } cacheEntry.setGlyphSet(grayGlyphSet); grayGlyphs.add(cacheEntry); } else { if (lcdGlyphs == null) { ! lcdGlyphs = new ArrayList<>(glyphList.size()); } cacheEntry.setGlyphSet(lcdGlyphSet); lcdGlyphs.add(cacheEntry); } } ! // Arrays and generics don't play well together ! @SuppressWarnings({"unchecked", "rawtypes"}) ! List<XRGlyphCacheEntry>[] tmp = ! (List<XRGlyphCacheEntry>[]) (new List[] { grayGlyphs, lcdGlyphs }); ! return tmp; } /** * Copies the glyph-images into a continous buffer, required for uploading. */