mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8189809: Large performance regression in Swing text layout
Reviewed-by: serb, pnarayanan
This commit is contained in:
parent
5f530a331b
commit
a110ef1d2f
3 changed files with 37 additions and 5 deletions
|
@ -56,6 +56,7 @@ import sun.font.CreatedFontTracker;
|
|||
import sun.font.Font2D;
|
||||
import sun.font.Font2DHandle;
|
||||
import sun.font.FontAccess;
|
||||
import sun.font.FontDesignMetrics;
|
||||
import sun.font.FontManager;
|
||||
import sun.font.FontManagerFactory;
|
||||
import sun.font.FontUtilities;
|
||||
|
@ -2603,9 +2604,8 @@ public class Font implements java.io.Serializable
|
|||
}
|
||||
|
||||
if (simple) {
|
||||
GlyphVector gv = new StandardGlyphVector(this, chars, beginIndex,
|
||||
limit - beginIndex, frc);
|
||||
return gv.getLogicalBounds();
|
||||
FontDesignMetrics metrics = FontDesignMetrics.getMetrics(this, frc);
|
||||
return metrics.getSimpleBounds(chars, beginIndex, limit-beginIndex);
|
||||
} else {
|
||||
// need char array constructor on textlayout
|
||||
String str = new String(chars, beginIndex, limit - beginIndex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue