JDK-8258694 : Rendering cached nodes with sub-pixel translation is blurry
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8,openjfx11,openjfx16
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-12-18
  • Updated: 2021-05-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
This is a follow-on to JDK-8211294.

To reproduce the bug, run the attached test program. This test program renders three controls with or without node caching enabled. The top two controls are deliberately rendered with fractional values of layoutX and layoutY. When caching is enabled, you can see that the text in those controls is blurry. When caching is disabled, the text is not blurry.

Rendering a shape or control into a cache and then rendering that cached image should match rendering that shape or control directly. This should be true the first time it is rendered, and should remain true as long as the transform is unchanged (or differs only by a translation delta of a whole pixel value) from when the cache was rendered into.

This is currently broken for rendering text if the translation is not on a pixel boundary, and is the main reason that the snap-to-pixel bug in JDK-8211294 led to such noticeable blurriness.

 See https://git.openjdk.java.net/jfx/pull/308 for some discussion on this.
Comments
This bug appears to have been present since the initial implementation of cached rendering. It is independent of HiDPI scaling.
18-12-2020