JDK-8257719 : JFXPanel scene fails to render correctly on HiDPI after fix for JDK-8199592
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx11,openjfx16
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-03
  • Updated: 2021-02-26
  • Resolved: 2020-12-09
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.
Related Reports
Relates :  
To reproduce this, run any JFXPanel app, such as the attached test program or HelloJFXPanel, on Windows with a screen scale > 1. The JFXPanel is rendered with a garbled image, suggesting that part of the code is rendering it with an incorrect scale factor.

This is a regression caused by the fix for JDK-8199592. Locally reverting that fix causes the problem to go away.

Btw, while we don't have any automated tests for this, we do have manual tests. I noticed this only when I went to run HelloJFXPanel today.

Workaround: resize the window after it is initially displayed.
Changeset: 1a8652af Author: Jose Pereda <jpereda@openjdk.org> Date: 2020-12-09 15:48:32 +0000 URL: https://git.openjdk.java.net/jfx/commit/1a8652af

So I clearly didn't run the manual tests on Windows when reviewing the earlier PR. I just did a full manual test run, and this is the only failure.