Skip to content

8358058: sun/java2d/OpenGL/DrawImageBg.java Test fails intermittently#27399

Closed
prrace wants to merge 2 commits intoopenjdk:masterfrom
prrace:opengl
Closed

8358058: sun/java2d/OpenGL/DrawImageBg.java Test fails intermittently#27399
prrace wants to merge 2 commits intoopenjdk:masterfrom
prrace:opengl

Conversation

@prrace
Copy link
Contributor

@prrace prrace commented Sep 19, 2025

Moving to open a number of graphics related tests, originally written to test the OpenGL pipeline.
These versions are "better behaved" than the versions that were in closed - mostly meaning they now
do things on the right thread and paint properly on demand.
As a result they now pass - at least on systems with correct drivers etc.
There are a few bugs to add to the issue list which I'll do right after submitting this.

I also extended these tests so as to run with the default pipeline on every system, not just OpenGL.
This mostly went OK except that I found one of the tests fails on macOS with metal.
I've had to add a new problem listing for that.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8358058: sun/java2d/OpenGL/DrawImageBg.java Test fails intermittently (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27399/head:pull/27399
$ git checkout pull/27399

Update a local copy of the PR:
$ git checkout pull/27399
$ git pull https://git.openjdk.org/jdk.git pull/27399/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27399

View PR using the GUI difftool:
$ git pr show -t 27399

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27399.diff

Using Webrev

Link to Webrev Comment

@prrace
Copy link
Contributor Author

prrace commented Sep 19, 2025

/issue add 8164487,8237245,8297094,8328098,8325761,8358058

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 19, 2025

👋 Welcome back prr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@prrace This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8358058: sun/java2d/OpenGL/DrawImageBg.java Test fails intermittently

Reviewed-by: azvegint, serb, psadhukhan

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 221 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title 8040230 8040230: Sep 19, 2025
@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@prrace The issue 8164487 was not found in the JDK project - make sure you have entered it correctly.
The issue 8297094 was not found in the JDK project - make sure you have entered it correctly.
The issue 8328098 was not found in the JDK project - make sure you have entered it correctly.
The issue 8325761 was not found in the JDK project - make sure you have entered it correctly.
The issue 8358058 was not found in the JDK project - make sure you have entered it correctly.
As there were validation problems, no additional issues will be added to the list of solved issues.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 19, 2025
@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@prrace The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@prrace prrace changed the title 8040230: 8040230 Sep 19, 2025
@openjdk openjdk bot changed the title 8040230 8040230: Sep 19, 2025
@prrace
Copy link
Contributor Author

prrace commented Sep 19, 2025

/issue add 8164487,8237245,8297094,8328098,8325761,8358058

@openjdk
Copy link

openjdk bot commented Sep 19, 2025

@prrace The issue 8164487 was not found in the JDK project - make sure you have entered it correctly.
As there were validation problems, no additional issues will be added to the list of solved issues.

@prrace prrace changed the title 8040230: 8358058: sun/java2d/OpenGL/DrawImageBg.java Test fails intermittently Sep 21, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 21, 2025
@prrace
Copy link
Contributor Author

prrace commented Sep 21, 2025

/issue add 8164487,8237245,8297094,8328098,8325761

@openjdk
Copy link

openjdk bot commented Sep 21, 2025

@prrace The issue 8164487 was not found in the JDK project - make sure you have entered it correctly.
As there were validation problems, no additional issues will be added to the list of solved issues.

@mlbridge
Copy link

mlbridge bot commented Sep 21, 2025

Webrevs

@mrserb
Copy link
Member

mrserb commented Sep 22, 2025

why on WIndows/Linux we set "-Dsun.java2d.uiScale=1" option and on mac we do not?

@prrace
Copy link
Contributor Author

prrace commented Sep 22, 2025

why on WIndows/Linux we set "-Dsun.java2d.uiScale=1" option and on mac we do not?

I'd have used uiScale=1 everywhere, but I actually observed a few rounding errors on retina if I used uiScale = 1 .
Letting uiScale be whatever is the default has so far worked on all Mac cases.

@mrserb
Copy link
Member

mrserb commented Sep 22, 2025

why on WIndows/Linux we set "-Dsun.java2d.uiScale=1" option and on mac we do not?

I'd have used uiScale=1 everywhere, but I actually observed a few rounding errors on retina if I used uiScale = 1 . Letting uiScale be whatever is the default has so far worked on all Mac cases.

If it works mostly fine on macos then why it is needed on win/lin?

* Graphics2D.drawImage(BufferedImage, BufferedImageOp, x, y) to an
* OpenGL-accelerated destination produces the same results when performed
* in software via BufferedImageOp.filter().
* @run main/othervm -Dsun.java2d.opengl=True -Dsun.java2d.uiScale=1 DrawBufImgOp -ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since it is failing if we remove ignore and since it is mentioned

/*
* If true, skips tests that are known to trigger bugs (which in
* turn may cause crashes, exceptions, or other artifacts).
*/

my opinion is to remove this param and problemlist this test in failing platform

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how the test already was. I'm not changing it. I'd be reducing testing if I did this.

Copy link
Contributor

@prsadhuk prsadhuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 23, 2025
@prrace
Copy link
Contributor Author

prrace commented Sep 23, 2025

why on WIndows/Linux we set "-Dsun.java2d.uiScale=1" option and on mac we do not?

I'd have used uiScale=1 everywhere, but I actually observed a few rounding errors on retina if I used uiScale = 1 . Letting uiScale be whatever is the default has so far worked on all Mac cases.

If it works mostly fine on macos then why it is needed on win/lin?

Because fractional scaling on Windows causes problems too. And Linux we don't scale unless it is 2X and I don't have anything to test that so playing it safe.

@mrserb
Copy link
Member

mrserb commented Sep 24, 2025

Because fractional scaling on Windows causes problems too. And Linux we don't scale unless it is 2X and I don't have anything to test that so playing it safe.

What are problems? Is it a product bug then? Or maybe the tests can use createMultiResolutionScreenCapture to get clean screenshots?

@prrace
Copy link
Contributor Author

prrace commented Sep 24, 2025

I don't think it is a JDK product bug. It is something in Apple's scaling that we can't do anything about.

@mrserb
Copy link
Member

mrserb commented Sep 24, 2025

I don't think it is a JDK product bug. It is something in Apple's scaling that we can't do anything about.

I meant on windows, why it does not work as is, so we need to set scale to 1, the tests seems do not use some complicated colors, patters.

@prrace
Copy link
Contributor Author

prrace commented Sep 26, 2025

I don't think it is a JDK product bug. It is something in Apple's scaling that we can't do anything about.

I meant on windows, why it does not work as is, so we need to set scale to 1, the tests seems do not use some complicated colors, patters.

I removed the -Dsun.java2d.uiScale=1 and ran the tests again - multiple times - on the hidpi system -
and on other platforms, and they still pass.
So I can't reproduce the failure to say what it was that I saw.

So I am going to remove it. And if it ever recurs I will investigate.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 26, 2025
* @test
* @bug 6248561 6264014
* @key headful
* @requires (os.family != "mac")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we only need one @test statement because they are now identical (besides @requires) after removing uiScale. Same for others.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 3, 2025
@prrace
Copy link
Contributor Author

prrace commented Oct 7, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Oct 7, 2025

Going to push as commit ebeb77b.
Since your change was applied there have been 249 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 7, 2025
@openjdk openjdk bot closed this Oct 7, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 7, 2025
@openjdk
Copy link

openjdk bot commented Oct 7, 2025

@prrace Pushed as commit ebeb77b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client client-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants