Re: [OpenJDK 2D-Dev] RFR: 8189809: Large performance regression in Swing text layout.

2017-12-11 Thread Sergey Bylokhov
Looks fine. On 11/12/2017 14:39, Phil Race wrote: Yes, it should  be negative since we want to use this as the y origin of the rectangle relative to the baseline. I am using it correctly in the height calculation. 40 float height = ascent + descent + leading; 541 return new

Re: [OpenJDK 2D-Dev] RFR: 8189809: Large performance regression in Swing text layout.

2017-12-11 Thread Phil Race
Yes, it should be negative since we want to use this as the y origin of the rectangle relative to the baseline. I am using it correctly in the height calculation. 40 float height = ascent + descent + leading; 541 return new Rectangle2D.Float(0f, ascent, width, height);

Re: [OpenJDK 2D-Dev] RFR: 8189809: Large performance regression in Swing text layout.

2017-12-11 Thread Sergey Bylokhov
Hi, Phil. The new code will calculate the logical bounds this way: 541 new Rectangle2D.Float(0f, ascent, width, height); But previously it was: 2613 new Rectangle2D.Float(0, -tl.getAscent(), tl.getAdvance(), 2614 tl.getAscent() + tl.getDescent() + 2615

Re: [OpenJDK 2D-Dev] RFR: 8189809: Large performance regression in Swing text layout.

2017-12-11 Thread Prahalad Kumar Narayanan
Hello Phil The change looks good to me. I found two interesting changes in your webrev. . The move to use FontDesignMetrics to compute width should be better than generating GlyphVector for the same. . Besides, the double conversion from chars[] to String and vice versa has been avoided as