Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234398

Replace ID2D1Factory::GetDesktopDpi with GetDeviceCaps

XMLWordPrintable

    • 2d
    • b27
    • windows

        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

              aivanov Alexey Ivanov
              aivanov Alexey Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: