JDK-8297241 : Update sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 20
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-11-18
  • Updated: 2022-12-03
  • Resolved: 2022-11-21
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 17 JDK 19 JDK 20
11.0.18Fixed 17.0.6Fixed 19.0.2Fixed 20 b25Fixed
Related Reports
Relates :  
Description
Verify and update sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java as per https://github.com/openjdk/jdk/pull/11158#discussion_r1025574199

Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1546 Date: 2022-11-22 21:31:56 +0000
22-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/919 Date: 2022-11-22 21:31:59 +0000
22-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk19u/pull/90 Date: 2022-11-22 20:41:05 +0000
22-11-2022

Changeset: 3c094982 Author: Jayathirth D V <jdv@openjdk.org> Date: 2022-11-21 09:50:57 +0000 URL: https://git.openjdk.org/jdk/commit/3c0949824e06f2b3d44f1bde9d2292a7627b0197
21-11-2022

If i introduce overridden empty paint() and update(), method i see that only in Linux CI machine it reached a state where nothing was drawn. This happened 1/20 times. Then went through https://www.oracle.com/java/technologies/painting.html which talks about system-triggered painting and app-triggered painting. After adding logs i see that we hit overridden paint method whenever there is resize of frame. Since we are updating the frame using drawImage in a loop, we are not hitting the system triggered paint() on resize with after we call frame.setSize(). I added Thread.yield() after frame.setSize(), but it dooesn't work all the time and it is captured in its doc. So i added robot.waitForIdle after frame.setSize() to make sure that we finish system triggered resize event and then continue drawing image on the frame.
18-11-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11237 Date: 2022-11-18 12:27:46 +0000
18-11-2022