< prev index next >

openjfx9/modules/javafx.graphics/src/main/java/com/sun/marlin/MarlinUtils.java

Print this page

        

*** 21,40 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package sun.java2d.marlin; ! public final class MarlinUtils { // Marlin logger private static final sun.util.logging.PlatformLogger LOG; static { if (MarlinConst.USE_LOGGER) { ! LOG = sun.util.logging.PlatformLogger.getLogger("sun.java2d.marlin"); } else { LOG = null; } } --- 21,39 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! package com.sun.marlin; public final class MarlinUtils { // Marlin logger private static final sun.util.logging.PlatformLogger LOG; static { if (MarlinConst.USE_LOGGER) { ! LOG = sun.util.logging.PlatformLogger.getLogger("prism.marlin"); } else { LOG = null; } }
*** 58,63 **** --- 57,94 ---- System.out.print("WARNING: "); System.out.println(msg); th.printStackTrace(System.err); } } + + // From sun.awt.util.ThreadGroupUtils + + /** + * Returns a root thread group. + * Should be called with {@link sun.security.util.SecurityConstants#MODIFY_THREADGROUP_PERMISSION} + * + * @return a root {@code ThreadGroup} + */ + public static ThreadGroup getRootThreadGroup() { + ThreadGroup currentTG = Thread.currentThread().getThreadGroup(); + ThreadGroup parentTG = currentTG.getParent(); + while (parentTG != null) { + currentTG = parentTG; + parentTG = currentTG.getParent(); + } + return currentTG; + } + + // JavaFX specific Cleaner for Marlin-FX: + // Module issue with jdk.internal.ref.Cleaner + private final static java.lang.ref.Cleaner cleaner + = java.lang.ref.Cleaner.create(); + + static java.lang.ref.Cleaner getCleaner() { + return cleaner; + } + /* + static jdk.internal.ref.Cleaner getCleaner() { + return jdk.internal.ref.CleanerFactory.cleaner(); + } + */ }
< prev index next >