mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-20 07:15:31 +00:00
8378192: Remove AppContext from SwingUtilities2
Reviewed-by: psadhukhan, kizune
This commit is contained in:
parent
9b44ea39bf
commit
2a71f89bc8
@ -92,7 +92,6 @@ import javax.swing.tree.TreeModel;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.awt.AppContext;
|
||||
import sun.awt.SunToolkit;
|
||||
import sun.font.FontDesignMetrics;
|
||||
import sun.font.FontUtilities;
|
||||
@ -1241,7 +1240,7 @@ public class SwingUtilities2 {
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final Object APP_CONTEXT_FRC_CACHE_KEY = new Object();
|
||||
private static final Map<Object, FontRenderContext> cache = new HashMap<>();
|
||||
|
||||
private static FontRenderContext getFRCFromCache(AffineTransform tx,
|
||||
Object aaHint) {
|
||||
@ -1249,15 +1248,6 @@ public class SwingUtilities2 {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Object, FontRenderContext> cache = (Map<Object, FontRenderContext>)
|
||||
AppContext.getAppContext().get(APP_CONTEXT_FRC_CACHE_KEY);
|
||||
|
||||
if (cache == null) {
|
||||
cache = new HashMap<>();
|
||||
AppContext.getAppContext().put(APP_CONTEXT_FRC_CACHE_KEY, cache);
|
||||
}
|
||||
|
||||
Object key = (tx == null)
|
||||
? aaHint
|
||||
: (aaHint == null ? tx : new KeyPair(tx, aaHint));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user