This is a follow-on bug to JDK-8149967.
In order to allow JavaFX to compile on both JDK 8 and JDK 9 while we transition to JDK 9 as the boot JDK, I added a short-term fix for a compilation problem caused by a Java2D change to an internal method that JFXPanel was using. That fix uses reflection to call SurfaceData::getDefaultScaleX rather than the now-removed SurfaceData::getDefaultScale method.
OnceJDK-8149964 is implemented to switch our required boot JDK to JDK 9, the reflection code can be removed and replaced with something more suitable. I had suggested calling both getDefaultScaleX and getDefaultScaleY, but Sergey pointed out that this information might be available using public API.
In order to allow JavaFX to compile on both JDK 8 and JDK 9 while we transition to JDK 9 as the boot JDK, I added a short-term fix for a compilation problem caused by a Java2D change to an internal method that JFXPanel was using. That fix uses reflection to call SurfaceData::getDefaultScaleX rather than the now-removed SurfaceData::getDefaultScale method.
Once
- duplicates
-
JDK-8091832 Provide a Screen.getScale method for Hi-DPI screens
- Resolved
- is blocked by
-
JDK-8149964 Update FX 9 boot JDK to JDK 9
- Resolved
- relates to
-
JDK-8149967 Cannot compile JFXPanel with JDK 9: SurfaceData::getDefaultScale not found
- Resolved