--- old/src/share/classes/java/awt/geom/Path2D.java 2011-12-01 18:54:49.971424053 +0100 +++ new/src/share/classes/java/awt/geom/Path2D.java 2011-12-01 18:54:49.759426248 +0100 @@ -651,6 +651,7 @@ * {@inheritDoc} * @since 1.6 */ + @SuppressWarnings("fallthrough") public final void append(PathIterator pi, boolean connect) { float coords[] = new float[6]; while (!pi.isDone()) { @@ -1376,6 +1377,7 @@ * {@inheritDoc} * @since 1.6 */ + @SuppressWarnings("fallthrough") public final void append(PathIterator pi, boolean connect) { double coords[] = new double[6]; while (!pi.isDone()) { @@ -2456,7 +2458,7 @@ } } } - s.writeByte((byte) SERIAL_PATH_END); + s.writeByte(SERIAL_PATH_END); } final void readObject(java.io.ObjectInputStream s, boolean storedbl) --- old/src/share/classes/sun/awt/image/BufImgSurfaceData.java 2011-12-01 18:54:50.598417552 +0100 +++ new/src/share/classes/sun/awt/image/BufImgSurfaceData.java 2011-12-01 18:54:50.419419409 +0100 @@ -323,8 +323,8 @@ } public RenderLoops getRenderLoops(SunGraphics2D sg2d) { - if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR && - sg2d.compositeState <= sg2d.COMP_ISCOPY) + if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY) { return solidloops; } --- old/src/share/classes/sun/java2d/SunGraphics2D.java 2011-12-01 18:54:51.122412121 +0100 +++ new/src/share/classes/sun/java2d/SunGraphics2D.java 2011-12-01 18:54:50.958413821 +0100 @@ -82,7 +82,6 @@ import sun.java2d.loops.SurfaceType; import sun.java2d.loops.Blit; import sun.java2d.loops.MaskFill; -import sun.font.FontManager; import java.awt.font.FontRenderContext; import sun.java2d.loops.XORComposite; import sun.awt.ConstrainableGraphics; @@ -941,7 +940,7 @@ } } } - Class paintClass = paint.getClass(); + Class paintClass = paint.getClass(); if (paintClass == GradientPaint.class) { paintState = PAINT_GRADIENT; } else if (paintClass == LinearGradientPaint.class) { @@ -1280,7 +1279,7 @@ interpolationHint = -1; interpolationType = AffineTransformOp.TYPE_NEAREST_NEIGHBOR; boolean customHintPresent = false; - Iterator iter = hints.keySet().iterator(); + Iterator iter = hints.keySet().iterator(); while (iter.hasNext()) { Object key = iter.next(); if (key == SunHints.KEY_RENDERING || @@ -1311,7 +1310,7 @@ */ public void addRenderingHints(Map hints) { boolean customHintPresent = false; - Iterator iter = hints.keySet().iterator(); + Iterator iter = hints.keySet().iterator(); while (iter.hasNext()) { Object key = iter.next(); if (key == SunHints.KEY_RENDERING || --- old/src/share/classes/sun/java2d/SurfaceData.java 2011-12-01 18:54:51.692406212 +0100 +++ new/src/share/classes/sun/java2d/SurfaceData.java 2011-12-01 18:54:51.527407923 +0100 @@ -48,7 +48,6 @@ import sun.java2d.loops.FillSpans; import sun.java2d.loops.FillParallelogram; import sun.java2d.loops.DrawParallelogram; -import sun.java2d.loops.FontInfo; import sun.java2d.loops.DrawGlyphList; import sun.java2d.loops.DrawGlyphListAA; import sun.java2d.loops.DrawGlyphListLCD; @@ -520,8 +519,8 @@ } public boolean canRenderParallelograms(SunGraphics2D sg2d) { - if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) { - if (sg2d.compositeState == sg2d.COMP_XOR) { + if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) { + if (sg2d.compositeState == SunGraphics2D.COMP_XOR) { if (havePgramXORLoop == LOOP_UNKNOWN) { FillParallelogram loop = FillParallelogram.locate(SurfaceType.AnyColor, @@ -531,9 +530,9 @@ (loop != null) ? LOOP_FOUND : LOOP_NOTFOUND; } return havePgramXORLoop == LOOP_FOUND; - } else if (sg2d.compositeState <= sg2d.COMP_ISCOPY && + } else if (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON && - sg2d.clipState != sg2d.CLIP_SHAPE) + sg2d.clipState != SunGraphics2D.CLIP_SHAPE) { if (havePgramSolidLoop == LOOP_UNKNOWN) { FillParallelogram loop = @@ -551,8 +550,8 @@ public void validatePipe(SunGraphics2D sg2d) { sg2d.imagepipe = imagepipe; - if (sg2d.compositeState == sg2d.COMP_XOR) { - if (sg2d.paintState > sg2d.PAINT_ALPHACOLOR) { + if (sg2d.compositeState == SunGraphics2D.COMP_XOR) { + if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR) { sg2d.drawpipe = paintViaShape; sg2d.fillpipe = paintViaShape; sg2d.shapepipe = paintShape; @@ -576,7 +575,7 @@ converter = colorViaShape; sg2d.shapepipe = colorPrimitives; } - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.drawpipe = converter; sg2d.fillpipe = converter; // REMIND: We should not be changing text strategies @@ -589,11 +588,11 @@ // which is not defined for XOR. sg2d.textpipe = outlineTextRenderer; } else { - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { sg2d.drawpipe = converter; sg2d.fillpipe = converter; } else { - if (sg2d.strokeState != sg2d.STROKE_THIN) { + if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) { sg2d.drawpipe = converter; } else { sg2d.drawpipe = colorPrimitives; @@ -604,9 +603,9 @@ } // assert(sg2d.surfaceData == this); } - } else if (sg2d.compositeState == sg2d.COMP_CUSTOM) { + } else if (sg2d.compositeState == SunGraphics2D.COMP_CUSTOM) { if (sg2d.antialiasHint == SunHints.INTVAL_ANTIALIAS_ON) { - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.drawpipe = AAClipCompViaShape; sg2d.fillpipe = AAClipCompViaShape; sg2d.shapepipe = AAClipCompViaShape; @@ -621,7 +620,7 @@ sg2d.drawpipe = compViaShape; sg2d.fillpipe = compViaShape; sg2d.shapepipe = compShape; - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.textpipe = clipCompText; } else { sg2d.textpipe = compText; @@ -631,7 +630,7 @@ sg2d.alphafill = getMaskFill(sg2d); // assert(sg2d.surfaceData == this); if (sg2d.alphafill != null) { - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.drawpipe = AAClipColorViaShape; sg2d.fillpipe = AAClipColorViaShape; sg2d.shapepipe = AAClipColorViaShape; @@ -644,8 +643,8 @@ sg2d.drawpipe = converter; sg2d.fillpipe = converter; sg2d.shapepipe = converter; - if (sg2d.paintState > sg2d.PAINT_ALPHACOLOR || - sg2d.compositeState > sg2d.COMP_ISCOPY) + if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR || + sg2d.compositeState > SunGraphics2D.COMP_ISCOPY) { sg2d.textpipe = colorText; } else { @@ -653,7 +652,7 @@ } } } else { - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.drawpipe = AAClipPaintViaShape; sg2d.fillpipe = AAClipPaintViaShape; sg2d.shapepipe = AAClipPaintViaShape; @@ -665,9 +664,9 @@ sg2d.textpipe = paintText; } } - } else if (sg2d.paintState > sg2d.PAINT_ALPHACOLOR || - sg2d.compositeState > sg2d.COMP_ISCOPY || - sg2d.clipState == sg2d.CLIP_SHAPE) + } else if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR || + sg2d.compositeState > SunGraphics2D.COMP_ISCOPY || + sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.drawpipe = paintViaShape; sg2d.fillpipe = paintViaShape; @@ -675,13 +674,13 @@ sg2d.alphafill = getMaskFill(sg2d); // assert(sg2d.surfaceData == this); if (sg2d.alphafill != null) { - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.textpipe = clipColorText; } else { sg2d.textpipe = colorText; } } else { - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { sg2d.textpipe = clipPaintText; } else { sg2d.textpipe = paintText; @@ -700,11 +699,11 @@ converter = colorViaShape; sg2d.shapepipe = colorPrimitives; } - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { sg2d.drawpipe = converter; sg2d.fillpipe = converter; } else { - if (sg2d.strokeState != sg2d.STROKE_THIN) { + if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) { sg2d.drawpipe = converter; } else { sg2d.drawpipe = colorPrimitives; @@ -817,7 +816,7 @@ private static CompositeType getFillCompositeType(SunGraphics2D sg2d) { CompositeType compType = sg2d.imageComp; - if (sg2d.compositeState == sg2d.COMP_ISCOPY) { + if (sg2d.compositeState == SunGraphics2D.COMP_ISCOPY) { if (compType == CompositeType.SrcOverNoEa) { compType = CompositeType.OpaqueSrcOverNoEa; } else { --- old/src/share/classes/sun/java2d/SurfaceDataProxy.java 2011-12-01 18:54:52.238400552 +0100 +++ new/src/share/classes/sun/java2d/SurfaceDataProxy.java 2011-12-01 18:54:52.087402117 +0100 @@ -37,7 +37,6 @@ import sun.java2d.loops.Blit; import sun.java2d.loops.BlitBg; import sun.awt.image.SurfaceManager; -import sun.awt.image.SurfaceManager.FlushableCacheData; import java.security.AccessController; import sun.security.action.GetPropertyAction; @@ -71,7 +70,7 @@ static { cachingAllowed = true; - String manimg = (String)AccessController.doPrivileged( + String manimg = AccessController.doPrivileged( new GetPropertyAction("sun.java2d.managedimages")); if (manimg != null && manimg.equals("false")) { cachingAllowed = false; @@ -79,7 +78,7 @@ } defaultThreshold = 1; - String num = (String)AccessController.doPrivileged( + String num = AccessController.doPrivileged( new GetPropertyAction("sun.java2d.accthreshold")); if (num != null) { try { --- old/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java 2011-12-01 18:54:52.744395308 +0100 +++ new/src/share/classes/sun/java2d/loops/GraphicsPrimitive.java 2011-12-01 18:54:52.588396923 +0100 @@ -316,6 +316,7 @@ public abstract GraphicsPrimitive traceWrap(); + @SuppressWarnings("rawtypes") static HashMap traceMap; public static int traceflags; @@ -328,7 +329,7 @@ static { GetPropertyAction gpa = new GetPropertyAction("sun.java2d.trace"); - String trace = (String)AccessController.doPrivileged(gpa); + String trace = AccessController.doPrivileged(gpa); if (trace != null) { boolean verbose = false; int traceflags = 0; @@ -391,9 +392,9 @@ private static PrintStream getTraceOutputFile() { if (traceout == null) { if (tracefile != null) { - Object o = - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + FileOutputStream o = AccessController.doPrivileged( + new PrivilegedAction() { + public FileOutputStream run() { try { return new FileOutputStream(tracefile); } catch (FileNotFoundException e) { @@ -402,7 +403,7 @@ } }); if (o != null) { - traceout = new PrintStream((OutputStream) o); + traceout = new PrintStream(o); } else { traceout = System.err; } @@ -415,8 +416,8 @@ public static class TraceReporter extends Thread { public static void setShutdownHook() { - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { TraceReporter t = new TraceReporter(); t.setContextClassLoader(null); Runtime.getRuntime().addShutdownHook(t); @@ -427,10 +428,12 @@ public void run() { PrintStream ps = getTraceOutputFile(); + @SuppressWarnings("rawtypes") Iterator iterator = traceMap.entrySet().iterator(); long total = 0; int numprims = 0; while (iterator.hasNext()) { + @SuppressWarnings("rawtypes") Map.Entry me = (Map.Entry) iterator.next(); Object prim = me.getKey(); int[] count = (int[]) me.getValue(); @@ -452,6 +455,7 @@ } } + @SuppressWarnings({ "rawtypes", "unchecked" }) public synchronized static void tracePrimitive(Object prim) { if ((traceflags & TRACECOUNTS) != 0) { if (traceMap == null) { --- old/src/share/classes/sun/java2d/loops/SurfaceType.java 2011-12-01 18:54:53.307389470 +0100 +++ new/src/share/classes/sun/java2d/loops/SurfaceType.java 2011-12-01 18:54:53.156391036 +0100 @@ -56,7 +56,7 @@ public final class SurfaceType { private static int unusedUID = 1; - private static HashMap surfaceUIDMap = new HashMap(100); + private static HashMap surfaceUIDMap = new HashMap<>(100); /* * CONSTANTS USED BY ALL PRIMITIVES TO DESCRIBE THE SURFACES @@ -402,7 +402,7 @@ } public synchronized static final int makeUniqueID(String desc) { - Integer i = (Integer) surfaceUIDMap.get((Object) desc); + Integer i = surfaceUIDMap.get(desc); if (i == null) { if (unusedUID > 255) { --- old/src/share/classes/sun/java2d/opengl/OGLBufImgOps.java 2011-12-01 18:54:53.868383656 +0100 +++ new/src/share/classes/sun/java2d/opengl/OGLBufImgOps.java 2011-12-01 18:54:53.702385375 +0100 @@ -78,12 +78,12 @@ } SurfaceData srcData = - dstData.getSourceSurfaceData(img, sg.TRANSFORM_ISIDENT, + dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null); if (!(srcData instanceof OGLSurfaceData)) { // REMIND: this hack tries to ensure that we have a cached texture srcData = - dstData.getSourceSurfaceData(img, sg.TRANSFORM_ISIDENT, + dstData.getSourceSurfaceData(img, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null); if (!(srcData instanceof OGLSurfaceData)) { return false; --- old/src/share/classes/sun/java2d/opengl/OGLDrawImage.java 2011-12-01 18:54:54.414377996 +0100 +++ new/src/share/classes/sun/java2d/opengl/OGLDrawImage.java 2011-12-01 18:54:54.238379820 +0100 @@ -60,7 +60,7 @@ SurfaceData dstData = sg.surfaceData; SurfaceData srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_GENERIC, + SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor); --- old/src/share/classes/sun/java2d/opengl/OGLPaints.java 2011-12-01 18:54:54.914372813 +0100 +++ new/src/share/classes/sun/java2d/opengl/OGLPaints.java 2011-12-01 18:54:54.758374430 +0100 @@ -25,21 +25,21 @@ package sun.java2d.opengl; -import java.awt.GradientPaint; +import static sun.java2d.opengl.OGLContext.OGLContextCaps.CAPS_EXT_GRAD_SHADER; +import static sun.java2d.pipe.BufferedPaints.MULTI_MAX_FRACTIONS; + import java.awt.LinearGradientPaint; import java.awt.MultipleGradientPaint; import java.awt.MultipleGradientPaint.ColorSpaceType; import java.awt.MultipleGradientPaint.CycleMethod; -import java.awt.RadialGradientPaint; import java.awt.TexturePaint; import java.awt.image.BufferedImage; import java.util.HashMap; import java.util.Map; + import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; import sun.java2d.loops.CompositeType; -import static sun.java2d.pipe.BufferedPaints.*; -import static sun.java2d.opengl.OGLContext.OGLContextCaps.*; abstract class OGLPaints { @@ -123,14 +123,16 @@ } SurfaceData srcData = - dstData.getSourceSurfaceData(bi, sg2d.TRANSFORM_ISIDENT, + dstData.getSourceSurfaceData(bi, + SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null); if (!(srcData instanceof OGLSurfaceData)) { // REMIND: this is a hack that attempts to cache the system // memory image from the TexturePaint instance into an // OpenGL texture... srcData = - dstData.getSourceSurfaceData(bi, sg2d.TRANSFORM_ISIDENT, + dstData.getSourceSurfaceData(bi, + SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null); if (!(srcData instanceof OGLSurfaceData)) { return false; --- old/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java 2011-12-01 18:54:55.409367682 +0100 +++ new/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java 2011-12-01 18:54:55.256369267 +0100 @@ -428,18 +428,18 @@ // by the CompositeType.SrcNoEa (any color) test below.) if (/* CompositeType.SrcNoEa (any color) */ - (sg2d.compositeState <= sg2d.COMP_ISCOPY && - sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) || + (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) || /* CompositeType.SrcOver (any color) */ - (sg2d.compositeState == sg2d.COMP_ALPHA && - sg2d.paintState <= sg2d.PAINT_ALPHACOLOR && + (sg2d.compositeState == SunGraphics2D.COMP_ALPHA && + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && (((AlphaComposite)sg2d.composite).getRule() == - AlphaComposite.SRC_OVER)) || + AlphaComposite.SRC_OVER)) || /* CompositeType.Xor (any color) */ - (sg2d.compositeState == sg2d.COMP_XOR && - sg2d.paintState <= sg2d.PAINT_ALPHACOLOR)) + (sg2d.compositeState == SunGraphics2D.COMP_XOR && + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR)) { textpipe = oglTextPipe; } else { @@ -454,12 +454,12 @@ OGLRenderer nonTxPipe = null; if (sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON) { - if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) { - if (sg2d.compositeState <= sg2d.COMP_XOR) { + if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) { + if (sg2d.compositeState <= SunGraphics2D.COMP_XOR) { txPipe = oglTxRenderPipe; nonTxPipe = oglRenderPipe; } - } else if (sg2d.compositeState <= sg2d.COMP_ALPHA) { + } else if (sg2d.compositeState <= SunGraphics2D.COMP_ALPHA) { if (OGLPaints.isValid(sg2d)) { txPipe = oglTxRenderPipe; nonTxPipe = oglRenderPipe; @@ -467,7 +467,7 @@ // custom paints handled by super.validatePipe() below } } else { - if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) { + if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR) { if (graphicsConfig.isCapPresent(CAPS_PS30) && (sg2d.imageComp == CompositeType.SrcOverNoEa || sg2d.imageComp == CompositeType.SrcOver)) @@ -484,7 +484,7 @@ sg2d.drawpipe = aaConverter; sg2d.fillpipe = aaConverter; sg2d.shapepipe = aaConverter; - } else if (sg2d.compositeState == sg2d.COMP_XOR) { + } else if (sg2d.compositeState == SunGraphics2D.COMP_XOR) { // install the solid pipes when AA and XOR are both enabled txPipe = oglTxRenderPipe; nonTxPipe = oglRenderPipe; @@ -494,10 +494,10 @@ } if (txPipe != null) { - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { sg2d.drawpipe = txPipe; sg2d.fillpipe = txPipe; - } else if (sg2d.strokeState != sg2d.STROKE_THIN) { + } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN) { sg2d.drawpipe = txPipe; sg2d.fillpipe = nonTxPipe; } else { @@ -524,7 +524,7 @@ @Override protected MaskFill getMaskFill(SunGraphics2D sg2d) { - if (sg2d.paintState > sg2d.PAINT_ALPHACOLOR) { + if (sg2d.paintState > SunGraphics2D.PAINT_ALPHACOLOR) { /* * We can only accelerate non-Color MaskFill operations if * all of the following conditions hold true: @@ -548,8 +548,8 @@ public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy) { - if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE && - sg2d.compositeState < sg2d.COMP_XOR) + if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE && + sg2d.compositeState < SunGraphics2D.COMP_XOR) { x += sg2d.transX; y += sg2d.transY; --- old/src/share/classes/sun/java2d/pipe/AAShapePipe.java 2011-12-01 18:54:55.928362303 +0100 +++ new/src/share/classes/sun/java2d/pipe/AAShapePipe.java 2011-12-01 18:54:55.773363910 +0100 @@ -144,7 +144,7 @@ public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) { boolean adjust = (bs != null && sg.strokeHint != SunHints.INTVAL_STROKE_PURE); - boolean thin = (sg.strokeState <= sg.STROKE_THINDASHED); + boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED); Region clip = sg.getCompClip(); int abox[] = new int[4]; --- old/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2011-12-01 18:54:56.419357213 +0100 +++ new/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2011-12-01 18:54:56.261358851 +0100 @@ -25,10 +25,16 @@ package sun.java2d.pipe; +import static sun.java2d.pipe.BufferedOpCodes.RESET_PAINT; +import static sun.java2d.pipe.BufferedOpCodes.SET_COLOR; +import static sun.java2d.pipe.BufferedOpCodes.SET_GRADIENT_PAINT; +import static sun.java2d.pipe.BufferedOpCodes.SET_LINEAR_GRADIENT_PAINT; +import static sun.java2d.pipe.BufferedOpCodes.SET_RADIAL_GRADIENT_PAINT; +import static sun.java2d.pipe.BufferedOpCodes.SET_TEXTURE_PAINT; + import java.awt.Color; import java.awt.GradientPaint; import java.awt.LinearGradientPaint; -import java.awt.MultipleGradientPaint; import java.awt.MultipleGradientPaint.ColorSpaceType; import java.awt.MultipleGradientPaint.CycleMethod; import java.awt.Paint; @@ -39,12 +45,11 @@ import java.awt.geom.Rectangle2D; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; + import sun.awt.image.PixelConverter; import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; import sun.java2d.loops.CompositeType; -import sun.java2d.loops.SurfaceType; -import static sun.java2d.pipe.BufferedOpCodes.*; public class BufferedPaints { @@ -247,7 +252,7 @@ BufferedImage bi = paint.getImage(); SurfaceData dstData = sg2d.surfaceData; SurfaceData srcData = - dstData.getSourceSurfaceData(bi, sg2d.TRANSFORM_ISIDENT, + dstData.getSourceSurfaceData(bi, SunGraphics2D.TRANSFORM_ISIDENT, CompositeType.SrcOver, null); boolean filter = (sg2d.interpolationType != --- old/src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java 2011-12-01 18:54:56.950351705 +0100 +++ new/src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java 2011-12-01 18:54:56.778353491 +0100 @@ -508,9 +508,9 @@ } public void draw(SunGraphics2D sg2d, Shape s) { - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { if (s instanceof Polygon) { - if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon)s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); return; @@ -518,7 +518,7 @@ } Path2D.Float p2df; int transx, transy; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { @@ -532,7 +532,7 @@ transy = 0; } drawPath(sg2d, p2df, transx, transy); - } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { + } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s); try { fillSpans(sg2d, si, 0, 0); @@ -547,11 +547,11 @@ public void fill(SunGraphics2D sg2d, Shape s) { int transx, transy; - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Here we are able to use fillPath() for // high-quality fills. Path2D.Float p2df; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { @@ -569,7 +569,7 @@ } AffineTransform at; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { // Transform (translation) will be done by FillSpans (we could // delegate to fillPolygon() here, but most hardware accelerated // libraries cannot handle non-convex polygons, so we will use --- old/src/share/classes/sun/java2d/pipe/DrawImage.java 2011-12-01 18:54:57.459346431 +0100 +++ new/src/share/classes/sun/java2d/pipe/DrawImage.java 2011-12-01 18:54:57.301348070 +0100 @@ -146,7 +146,7 @@ int imgh = img.getHeight(null); boolean checkfinalxform; - if (sg.transformState <= sg.TRANSFORM_ANY_TRANSLATE && + if (sg.transformState <= SunGraphics2D.TRANSFORM_ANY_TRANSLATE && (txtype == AffineTransform.TYPE_IDENTITY || txtype == AffineTransform.TYPE_TRANSLATION)) { @@ -166,7 +166,7 @@ return; } checkfinalxform = false; - } else if (sg.transformState <= sg.TRANSFORM_TRANSLATESCALE && + } else if (sg.transformState <= SunGraphics2D.TRANSFORM_TRANSLATESCALE && ((txtype & (AffineTransform.TYPE_FLIP | AffineTransform.TYPE_MASK_ROTATION | AffineTransform.TYPE_GENERAL_TRANSFORM)) == 0)) @@ -344,14 +344,14 @@ Region clip = sg.getCompClip(); SurfaceData dstData = sg.surfaceData; SurfaceData srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_GENERIC, + SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor); if (srcData == null) { img = getBufferedImage(img); srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_GENERIC, + SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor); if (srcData == null) { @@ -372,7 +372,7 @@ sx1 = sy1 = 0; srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_GENERIC, + SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor); } @@ -398,7 +398,7 @@ sx1 = sy1 = 0; srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_GENERIC, + SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, null); srcType = srcData.getSurfaceType(); @@ -449,7 +449,7 @@ SurfaceType dstType = dstData.getSurfaceType(); MaskBlit maskblit; Blit blit; - if (sg.compositeState <= sg.COMP_ALPHA) { + if (sg.compositeState <= SunGraphics2D.COMP_ALPHA) { /* NOTE: We either have, or we can make, * a MaskBlit for any alpha composite type */ @@ -565,7 +565,7 @@ while (true) { SurfaceData srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_ISIDENT, + SunGraphics2D.TRANSFORM_ISIDENT, sg.imageComp, bgColor); if (srcData == null) { @@ -628,7 +628,7 @@ while (true) { SurfaceData srcData = dstData.getSourceSurfaceData(img, - sg.TRANSFORM_TRANSLATESCALE, + SunGraphics2D.TRANSFORM_TRANSLATESCALE, sg.imageComp, bgColor); @@ -800,11 +800,11 @@ public static boolean isSimpleTranslate(SunGraphics2D sg) { int ts = sg.transformState; - if (ts <= sg.TRANSFORM_INT_TRANSLATE) { + if (ts <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { // Integer translates are always "simple" return true; } - if (ts >= sg.TRANSFORM_TRANSLATESCALE) { + if (ts >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { // Scales and beyond are always "not simple" return false; } @@ -846,8 +846,11 @@ } int type = tx.getType(); boolean needTrans = - ((type&(tx.TYPE_MASK_ROTATION|tx.TYPE_GENERAL_TRANSFORM)) != 0); - if (! needTrans && type != tx.TYPE_TRANSLATION && type != tx.TYPE_IDENTITY) + ((type & (AffineTransform.TYPE_MASK_ROTATION | + AffineTransform.TYPE_GENERAL_TRANSFORM)) != 0); + if (! needTrans && + type != AffineTransform.TYPE_TRANSLATION && + type != AffineTransform.TYPE_IDENTITY) { double[] mtx = new double[4]; tx.getMatrix(mtx); @@ -861,7 +864,7 @@ Raster raster = bImg.getRaster(); IndexColorModel icm = (IndexColorModel) cm; // Just need to make sure that we have a transparent pixel - if (needTrans && cm.getTransparency() == cm.OPAQUE) { + if (needTrans && cm.getTransparency() == Transparency.OPAQUE) { // Fix 4221407 if (raster instanceof sun.awt.image.BytePackedRaster) { dstCM = ColorModel.getRGBdefault(); @@ -892,7 +895,7 @@ } /* raster instanceof sun.awt.image.BytePackedRaster */ } /* if (cm.getTransparency() == cm.OPAQUE) */ } /* if (cm instanceof IndexColorModel) */ - else if (needTrans && cm.getTransparency() == cm.OPAQUE) { + else if (needTrans && cm.getTransparency() == Transparency.OPAQUE) { // Need a bitmask transparency // REMIND: for now, use full transparency since no loops // for bitmask @@ -902,7 +905,7 @@ else { if (cm instanceof IndexColorModel || - (needTrans && cm.getTransparency() == cm.OPAQUE)) + (needTrans && cm.getTransparency() == Transparency.OPAQUE)) { // Need a bitmask transparency // REMIND: for now, use full transparency since no loops --- old/src/share/classes/sun/java2d/pipe/GlyphListPipe.java 2011-12-01 18:54:58.003340793 +0100 +++ new/src/share/classes/sun/java2d/pipe/GlyphListPipe.java 2011-12-01 18:54:57.847342410 +0100 @@ -25,17 +25,13 @@ package sun.java2d.pipe; -import java.awt.Font; -import java.awt.Rectangle; -import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.font.TextLayout; -import sun.awt.SunHints; +import sun.font.GlyphList; import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; -import sun.font.GlyphList; import sun.java2d.loops.FontInfo; /** @@ -54,7 +50,7 @@ } float devx, devy; - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { double origin[] = {x + info.originX, y + info.originY}; sg2d.transform.transform(origin, 0, origin, 0, 1); devx = (float)origin[0]; @@ -90,7 +86,7 @@ sg2d, data, offset, length, ix, iy); return; } - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { double origin[] = {ix + info.originX, iy + info.originY}; sg2d.transform.transform(origin, 0, origin, 0, 1); x = (float) origin[0]; @@ -122,7 +118,7 @@ SurfaceData.outlineTextRenderer.drawGlyphVector(sg2d, gv, x, y); return; } - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { double origin[] = {x, y}; sg2d.transform.transform(origin, 0, origin, 0, 1); x = (float) origin[0]; --- old/src/share/classes/sun/java2d/pipe/LoopPipe.java 2011-12-01 18:54:58.509335547 +0100 +++ new/src/share/classes/sun/java2d/pipe/LoopPipe.java 2011-12-01 18:54:58.354337154 +0100 @@ -25,25 +25,20 @@ package sun.java2d.pipe; -import java.awt.Font; -import java.awt.Shape; import java.awt.BasicStroke; -import java.awt.Polygon; +import java.awt.Shape; import java.awt.geom.AffineTransform; -import java.awt.geom.PathIterator; -import java.awt.geom.RoundRectangle2D; -import java.awt.geom.Ellipse2D; import java.awt.geom.Arc2D; -import java.awt.geom.IllegalPathStateException; +import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; -import java.awt.font.GlyphVector; +import java.awt.geom.PathIterator; +import java.awt.geom.RoundRectangle2D; + +import sun.awt.SunHints; import sun.java2d.SunGraphics2D; import sun.java2d.SurfaceData; -import sun.java2d.loops.FontInfo; -import sun.java2d.loops.DrawPolygons; -import sun.java2d.loops.FillParallelogram; import sun.java2d.loops.DrawParallelogram; -import sun.awt.SunHints; +import sun.java2d.loops.FillParallelogram; public class LoopPipe implements PixelDrawPipe, @@ -171,11 +166,11 @@ public void draw(SunGraphics2D sg2d, Shape s) { - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transX; int transY; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { @@ -193,7 +188,7 @@ return; } - if (sg2d.strokeState == sg2d.STROKE_CUSTOM) { + if (sg2d.strokeState == SunGraphics2D.STROKE_CUSTOM) { fill(sg2d, sg2d.stroke.createStrokedShape(s)); return; } @@ -271,7 +266,7 @@ sr.setRule(PathIterator.WIND_NON_ZERO); BasicStroke bs = (BasicStroke) sg2d.stroke; - boolean thin = (sg2d.strokeState <= sg2d.STROKE_THINDASHED); + boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED); boolean normalize = (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE); @@ -288,11 +283,11 @@ } public void fill(SunGraphics2D sg2d, Shape s) { - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { Path2D.Float p2df; int transX; int transY; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { @@ -314,7 +309,7 @@ try { sr.setOutputArea(sg2d.getCompClip()); AffineTransform at = - ((sg2d.transformState == sg2d.TRANSFORM_ISIDENT) + ((sg2d.transformState == SunGraphics2D.TRANSFORM_ISIDENT) ? null : sg2d.transform); sr.appendPath(s.getPathIterator(at)); @@ -328,7 +323,7 @@ // REMIND: Eventually, the plan is that it will not be possible for // fs to be null since the FillSpans loop will be the fundamental // loop implemented for any destination type... - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { si = sg2d.clipRegion.filter(si); // REMIND: Region.filter produces a Java-only iterator // with no native counterpart... --- old/src/share/classes/sun/java2d/pipe/RenderingEngine.java 2011-12-01 18:54:59.032330127 +0100 +++ new/src/share/classes/sun/java2d/pipe/RenderingEngine.java 2011-12-01 18:54:58.874331763 +0100 @@ -117,16 +117,16 @@ return reImpl; } - reImpl = (RenderingEngine) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + reImpl = + AccessController.doPrivileged(new PrivilegedAction() { + public RenderingEngine run() { final String ductusREClass = "sun.dc.DuctusRenderingEngine"; String reClass = System.getProperty("sun.java2d.renderer", ductusREClass); if (reClass.equals(ductusREClass)) { try { - Class cls = Class.forName(ductusREClass); - return cls.newInstance(); + Class cls = Class.forName(ductusREClass); + return (RenderingEngine) cls.newInstance(); } catch (ReflectiveOperationException ignored) { // not found } @@ -153,7 +153,7 @@ GetPropertyAction gpa = new GetPropertyAction("sun.java2d.renderer.trace"); - String reTrace = (String) AccessController.doPrivileged(gpa); + String reTrace = AccessController.doPrivileged(gpa); if (reTrace != null) { reImpl = new Tracer(reImpl); } --- old/src/solaris/classes/sun/java2d/x11/X11Renderer.java 2011-12-01 18:54:59.641323830 +0100 +++ new/src/solaris/classes/sun/java2d/x11/X11Renderer.java 2011-12-01 18:54:59.399326322 +0100 @@ -28,20 +28,18 @@ import java.awt.Polygon; import java.awt.Shape; import java.awt.geom.AffineTransform; -import java.awt.geom.PathIterator; import java.awt.geom.Path2D; -import java.awt.geom.IllegalPathStateException; + import sun.awt.SunToolkit; import sun.java2d.SunGraphics2D; -import sun.java2d.SurfaceData; import sun.java2d.loops.GraphicsPrimitive; -import sun.java2d.pipe.Region; +import sun.java2d.pipe.LoopPipe; import sun.java2d.pipe.PixelDrawPipe; import sun.java2d.pipe.PixelFillPipe; +import sun.java2d.pipe.Region; import sun.java2d.pipe.ShapeDrawPipe; -import sun.java2d.pipe.SpanIterator; import sun.java2d.pipe.ShapeSpanIterator; -import sun.java2d.pipe.LoopPipe; +import sun.java2d.pipe.SpanIterator; public class X11Renderer implements PixelDrawPipe, @@ -299,7 +297,7 @@ private void doPath(SunGraphics2D sg2d, Shape s, boolean isFill) { Path2D.Float p2df; int transx, transy; - if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) { + if (sg2d.transformState <= SunGraphics2D.TRANSFORM_INT_TRANSLATE) { if (s instanceof Path2D.Float) { p2df = (Path2D.Float)s; } else { @@ -323,10 +321,10 @@ } public void draw(SunGraphics2D sg2d, Shape s) { - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to drawPolygon() if possible... if (s instanceof Polygon && - sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) + sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); @@ -336,7 +334,7 @@ // Otherwise we will use drawPath() for // high-quality thin paths. doPath(sg2d, s, false); - } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) { + } else if (sg2d.strokeState < SunGraphics2D.STROKE_CUSTOM) { // REMIND: X11 can handle uniform scaled wide lines // and dashed lines itself if we set the appropriate // XGC attributes (TBD). @@ -360,10 +358,10 @@ } public void fill(SunGraphics2D sg2d, Shape s) { - if (sg2d.strokeState == sg2d.STROKE_THIN) { + if (sg2d.strokeState == SunGraphics2D.STROKE_THIN) { // Delegate to fillPolygon() if possible... if (s instanceof Polygon && - sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) + sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { Polygon p = (Polygon) s; fillPolygon(sg2d, p.xpoints, p.ypoints, p.npoints); @@ -378,7 +376,7 @@ AffineTransform at; int transx, transy; - if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE) { // Transform (translation) will be done by XFillSpans at = null; transx = sg2d.transX; --- old/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2011-12-01 18:55:00.160318434 +0100 +++ new/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2011-12-01 18:54:59.999320101 +0100 @@ -25,28 +25,24 @@ package sun.java2d.x11; -import java.awt.GraphicsDevice; -import java.awt.GraphicsEnvironment; -import java.awt.Color; import java.awt.Composite; -import java.awt.Rectangle; import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.awt.Image; -import java.awt.color.ColorSpace; +import java.awt.Rectangle; import java.awt.Transparency; -import java.awt.image.BufferedImage; +import java.awt.color.ColorSpace; import java.awt.image.ColorModel; import java.awt.image.ComponentColorModel; import java.awt.image.DirectColorModel; import java.awt.image.IndexColorModel; import java.awt.image.Raster; -import java.awt.peer.ComponentPeer; import sun.awt.SunHints; import sun.awt.SunToolkit; import sun.awt.X11ComponentPeer; import sun.awt.X11GraphicsConfig; -import sun.awt.X11GraphicsEnvironment; import sun.awt.image.PixelConverter; import sun.font.X11TextRenderer; import sun.java2d.InvalidPipeException; @@ -54,16 +50,15 @@ import sun.java2d.SunGraphicsEnvironment; import sun.java2d.SurfaceData; import sun.java2d.SurfaceDataProxy; -import sun.java2d.loops.SurfaceType; import sun.java2d.loops.CompositeType; -import sun.java2d.loops.RenderLoops; import sun.java2d.loops.GraphicsPrimitive; +import sun.java2d.loops.RenderLoops; +import sun.java2d.loops.SurfaceType; import sun.java2d.loops.XORComposite; -import sun.java2d.loops.Blit; -import sun.java2d.pipe.ValidatePipe; import sun.java2d.pipe.PixelToShapeConverter; -import sun.java2d.pipe.TextPipe; import sun.java2d.pipe.Region; +import sun.java2d.pipe.TextPipe; +import sun.java2d.pipe.ValidatePipe; public abstract class X11SurfaceData extends XSurfaceData { X11ComponentPeer peer; @@ -295,9 +290,9 @@ public void validatePipe(SunGraphics2D sg2d) { if (sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON && - sg2d.paintState <= sg2d.PAINT_ALPHACOLOR && - (sg2d.compositeState <= sg2d.COMP_ISCOPY || - sg2d.compositeState == sg2d.COMP_XOR)) + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && + (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY || + sg2d.compositeState == SunGraphics2D.COMP_XOR)) { if (x11txpipe == null) { /* @@ -315,7 +310,7 @@ return; } - if (sg2d.clipState == sg2d.CLIP_SHAPE) { + if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) { // Do this to init textpipe correctly; we will override the // other non-text pipes below // REMIND: we should clean this up eventually instead of @@ -329,7 +324,7 @@ case SunHints.INTVAL_TEXT_ANTIALIAS_OFF: // Use X11 pipe even if DGA is available since DGA // text slows everything down when mixed with X11 calls - if (sg2d.compositeState == sg2d.COMP_ISCOPY) { + if (sg2d.compositeState == SunGraphics2D.COMP_ISCOPY) { sg2d.textpipe = x11textpipe; } else { sg2d.textpipe = solidTextRenderer; @@ -353,7 +348,7 @@ case SunHints.INTVAL_TEXT_ANTIALIAS_OFF: // Use X11 pipe even if DGA is available since DGA // text slows everything down when mixed with X11 calls - if (sg2d.compositeState == sg2d.COMP_ISCOPY) { + if (sg2d.compositeState == SunGraphics2D.COMP_ISCOPY) { sg2d.textpipe = x11textpipe; } else { sg2d.textpipe = solidTextRenderer; @@ -370,10 +365,10 @@ } } - if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { + if (sg2d.transformState >= SunGraphics2D.TRANSFORM_TRANSLATESCALE) { sg2d.drawpipe = x11txpipe; sg2d.fillpipe = x11txpipe; - } else if (sg2d.strokeState != sg2d.STROKE_THIN){ + } else if (sg2d.strokeState != SunGraphics2D.STROKE_THIN){ sg2d.drawpipe = x11txpipe; sg2d.fillpipe = x11pipe; } else { @@ -398,8 +393,8 @@ } public RenderLoops getRenderLoops(SunGraphics2D sg2d) { - if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR && - sg2d.compositeState <= sg2d.COMP_ISCOPY) + if (sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY) { return solidloops; } @@ -488,7 +483,7 @@ makePipes(); } CompositeType comptype = sg2d.imageComp; - if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE && + if (sg2d.transformState < SunGraphics2D.TRANSFORM_TRANSLATESCALE && (CompositeType.SrcOverNoEa.equals(comptype) || CompositeType.SrcNoEa.equals(comptype))) {