JDK-8234398 : Replace ID2D1Factory::GetDesktopDpi with GetDeviceCaps
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 11,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2019-11-19
  • Updated: 2020-06-16
  • Resolved: 2019-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.
JDK 11 JDK 13 JDK 14
11.0.8-oracleFixed 13.0.4Fixed 14 b27Fixed
Related Reports
Relates :  
Relates :  
Description
ID2D1Factory::GetDesktopDpi is deprecated [1][2] in latest version of Windows SDK (VS 2017 / VS 2019). This call can be replaced with two calls to GetDeviceCaps(hdc, LOGPIXELSX) and GetDeviceCaps(hdc, LOGPIXELSY) to cover Windows 7 and 8.0 where GetDpiForMonitor is not available.

This change will also ditch dependency on d2d1.dll.

[1] http://mail.openjdk.java.net/pipermail/awt-dev/2019-October/015460.html
[2] http://mail.openjdk.java.net/pipermail/awt-dev/2019-November/015513.html
Comments
Fix request (13u) Requesting backport to 13u for parity with 11u, applies cleanly.
09-06-2020

Fix request (11u) -- will label after testing completed. I would like to downport this for parity with 11.0.8-oracle. Applies clean.
13-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/b7a958df3992 User: psadhukhan Date: 2019-12-11 06:34:35 +0000
11-12-2019

URL: https://hg.openjdk.java.net/jdk/client/rev/b7a958df3992 User: aivanov Date: 2019-12-09 19:46:02 +0000
09-12-2019