--- old/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java 2015-11-20 13:32:46.000000000 -0800 +++ new/src/java.desktop/share/classes/sun/java2d/pipe/RenderingEngine.java 2015-11-20 13:32:46.000000000 -0800 @@ -96,9 +96,14 @@ * * * If no specific {@code RenderingEngine} is specified on the command - * or Ductus renderer is specified, it will first attempt loading the - * sun.dc.DuctusRenderingEngine class using Class.forName, if that - * is not found, then it will look for Pisces. + * line or the requested class fails to load, then the Marlin + * renderer will be used as the default. + *

+ * A printout of which RenderingEngine is loaded and used can be + * enabled by specifying the runtime flag: + *

+     *     java -Dsun.java2d.renderer.verbose=true
+     * 
*

* Runtime tracing of the actions of the {@code RenderingEngine} * can be enabled by specifying the runtime flag: @@ -113,20 +118,23 @@ return reImpl; } - /* Look first for ductus or an app-override renderer, - * if not specified or present, then look for pisces. + /* Look first for an app-override renderer, + * if not specified or present, then look for marlin. */ - final String ductusREClass = "sun.dc.DuctusRenderingEngine"; - final String piscesREClass = "sun.java2d.pisces.PiscesRenderingEngine"; GetPropertyAction gpa = - new GetPropertyAction("sun.java2d.renderer", ductusREClass); + new GetPropertyAction("sun.java2d.renderer"); String reClass = AccessController.doPrivileged(gpa); - try { - Class cls = Class.forName(reClass); - reImpl = (RenderingEngine) cls.newInstance(); - } catch (ReflectiveOperationException ignored0) { + if (reClass != null) { + try { + Class cls = Class.forName(reClass); + reImpl = (RenderingEngine) cls.newInstance(); + } catch (ReflectiveOperationException ignored0) { + } + } + if (reImpl == null) { + final String marlinREClass = "sun.java2d.marlin.MarlinRenderingEngine"; try { - Class cls = Class.forName(piscesREClass); + Class cls = Class.forName(marlinREClass); reImpl = (RenderingEngine) cls.newInstance(); } catch (ReflectiveOperationException ignored1) { } @@ -136,6 +144,12 @@ throw new InternalError("No RenderingEngine module found"); } + gpa = new GetPropertyAction("sun.java2d.renderer.verbose"); + String verbose = AccessController.doPrivileged(gpa); + if (verbose != null && verbose.startsWith("t")) { + System.out.println("RenderingEngine = "+reImpl); + } + gpa = new GetPropertyAction("sun.java2d.renderer.trace"); String reTrace = AccessController.doPrivileged(gpa); if (reTrace != null) {