RFR: 8211294: [windows] TextArea content is blurry with 125% scaling

Kevin Rushforth kcr at openjdk.java.net
Sat Dec 12 22:34:57 UTC 2020

On Sat, 12 Dec 2020 14:57:05 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>>> I hope to take a look at this, along with other pending reviews, early next week. There is still some time to get this into 16 if we can find a robust fix.
>> That's great news, thanks!
> I spent a bit of time looking at this. I think the root cause of the problem is in ScrollPane itself. It is attempting to layout its children by doing a snap to pixel (meaning that the final scaled translation should be an integer value), but it is failing to do so. This is mostly not a problem when caching is disabled, since our text rendering does sub-pixel antialiasing that looks crisp even at non-integer boundaries. However, translating an already-rendered image by a non-integer boundary will cause the blurriness we are seeing. There is another issue with the Y translation which isn't 0 even when  not using a ScrollPane.
> I'll continue looking at this in the coming week.

One more comment: given the quality problems that necessarily arise when the translation of a cached image is not on an integer boundary, part of the solution might be to snap the cached image to a pixel boundary as is done in this PR, but we would need to ensure that this doesn't impact smooth scrolling of a TextArea.


PR: https://git.openjdk.java.net/jfx/pull/308

More information about the openjfx-dev mailing list