[jdk21u-dev] RFR: 8369335: Two sun/java2d/OpenGL tests fail on Windows after JDK-8358058

Roland Mesde duke at openjdk.org
Thu Feb 26 21:38:28 UTC 2026


Backporting JDK-8369335: Two  sun/java2d/OpenGL tests fail on Windows after JDK-8358058.

This PR fixes two OpenGL tests (ScaleParamsOOB.java and OpaqueDest.java) fail after JDK-8358058 with color mismatch errors due to HiDPI fractional scaling issues when using OpenGL with hardware acceleration. Tests updated to handle Windows HiDPI fractional scaling correctly.

Note: test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java fails on Linux. Issues related to [JDK-8378113](https://bugs.openjdk.org/browse/JDK-8378113) will be addressed in a separate backport PR (https://github.com/openjdk/jdk21u-dev/pull/2645).

Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:

make test TEST=test/jdk/sun/java2d/OpenGL/OpaqueDest.java
make test TEST=test/jdk/sun/java2d/OpenGL/ScaleParamsOOB.java

Results attached:

[windows-x64-specific-test.log](https://github.com/user-attachments/files/25587838/windows-x64-specific-test.log)
[windows-x64-specific-2-test.log](https://github.com/user-attachments/files/25587839/windows-x64-specific-2-test.log)
[macos-aarch64-specific-test.log](https://github.com/user-attachments/files/25587840/macos-aarch64-specific-test.log)
[macos-aarch64-specific-2-test.log](https://github.com/user-attachments/files/25587841/macos-aarch64-specific-2-test.log)
[linux-x64-specific-test.log](https://github.com/user-attachments/files/25587842/linux-x64-specific-test.log)
[linux-x64-specific-2-test.log](https://github.com/user-attachments/files/25587843/linux-x64-specific-2-test.log)
[linux-aarch64-specific-test.log](https://github.com/user-attachments/files/25587844/linux-aarch64-specific-test.log)
[linux-aarch64-specific-2-test.log](https://github.com/user-attachments/files/25587845/linux-aarch64-specific-2-test.log)

-------------

Depends on: https://git.openjdk.org/jdk21u-dev/pull/2636

Commit messages:
 - Backport d6ca382f4ee5793dfa191bba694a7fef88c591fc

Changes: https://git.openjdk.org/jdk21u-dev/pull/2644/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2644&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369335
  Stats: 38 lines in 2 files changed: 18 ins; 0 del; 20 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/2644.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2644/head:pull/2644

PR: https://git.openjdk.org/jdk21u-dev/pull/2644


More information about the jdk-updates-dev mailing list