Skip to content

8382201: Transparent Window is Opaque w/o Volatile Buffering#30737

Closed
mickleness wants to merge 12 commits into
openjdk:masterfrom
mickleness:8382201
Closed

8382201: Transparent Window is Opaque w/o Volatile Buffering#30737
mickleness wants to merge 12 commits into
openjdk:masterfrom
mickleness:8382201

Conversation

@mickleness
Copy link
Copy Markdown
Contributor

@mickleness mickleness commented Apr 15, 2026

If swing.volatileImageBufferEnabled is turned off: MTLGraphicsConfig and CGLGraphicsConfig should use a translucent image for double buffering.

This test is marked as mac-only, but it should be harmless to turn that flag off if anyone wants to test other platforms. In previous threads we established that this is a Mac-only issue: #23430 (comment)



Progress

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

Issue

  • JDK-8382201: Transparent Window is Opaque w/o Volatile Buffering (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30737

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Also RepaintManager may let windows share the same buffer. In this test's case: the white background (in an opaque Frame) set up a large buffer, and the smaller translucent dialog needs to recreate a buffer to provide translucency.
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Apr 15, 2026

👋 Welcome back jwood! 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
Copy Markdown

openjdk Bot commented Apr 15, 2026

@mickleness 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:

8382201: Transparent Window is Opaque w/o Volatile Buffering

Reviewed-by: prr, jdv

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 36 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@prrace, @jayathirthrao) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk Bot added the client client-libs-dev@openjdk.org label Apr 15, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 15, 2026

@mickleness 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.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 15, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Apr 15, 2026

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 16, 2026

The total number of required reviews for this PR has been set to 2 based on the presence of this label: client. This can be overridden with the /reviewers command.

@mickleness mickleness marked this pull request as draft April 17, 2026 03:32
@mickleness
Copy link
Copy Markdown
Contributor Author

Converting to draft; I want to resolve #30783 first.

@openjdk openjdk Bot removed the rfr Pull request is ready for review label Apr 17, 2026
Also simplifying unit test so it doesn't require a white background Frame.

The opacity issue is important, but it can be represented as a separate ticket. (I'm trying to keep PRs as simple as possible to speed up/simplify code review.)
@mickleness mickleness marked this pull request as ready for review April 20, 2026 23:54
@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 20, 2026
I must have gotten my tickets mixed up when I removed these properties. We DO want to toggle opengl (so we test both MTL and CGL), and we want volatile images permanently off for this test.
@prrace
Copy link
Copy Markdown
Contributor

prrace commented Apr 21, 2026

I tested OpenGL and Metal with your test as well as SwingSet and J2Demo and it looks good.
I will however also submit a test job to run all our automated tests.

/*
* @test
* @bug 8382201
* @summary This tests window translucency when
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The test needs
@key headful

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, this is updated

private void run() {
try {
SwingUtilities.invokeAndWait(() -> {
JDialog translucentDialog = createDialog();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This dialog is never disposed, so you are relying on jtreg shutting the test down to cause the test to terminate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, this is updated

* @summary This tests window translucency when
* `swing.volatileImageBufferEnabled=false`
* @requires os.family == "mac"
* @library /java/awt/regtesthelpers
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't see any use of regtesthelpers here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, this is updated

/*
* @test
* @bug 8382201
` * @key headful
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's an errant "`" at the beginning of that line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, sorry. This is updated

Copy link
Copy Markdown
Member

@jayathirthrao jayathirthrao left a comment

Choose a reason for hiding this comment

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

Change looks good to me, except comment about copyright year.
Verified test behaviour also on my mac.

@@ -0,0 +1,183 @@
/*
* Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a new test, it should have only starting year 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, this is updated

@mickleness
Copy link
Copy Markdown
Contributor Author

/integrate

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Apr 30, 2026

@mickleness This pull request has not yet been marked as ready for integration.

@mickleness mickleness requested a review from prrace April 30, 2026 16:49
@openjdk openjdk Bot added the ready Pull request is ready to be integrated label May 1, 2026
@mickleness
Copy link
Copy Markdown
Contributor Author

/integrate

@openjdk openjdk Bot added the sponsor Pull request is ready to be sponsored label May 1, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 1, 2026

@mickleness
Your change (at version 854c914) is now ready to be sponsored by a Committer.

@prrace
Copy link
Copy Markdown
Contributor

prrace commented May 4, 2026

/integrate

@prrace
Copy link
Copy Markdown
Contributor

prrace commented May 4, 2026

/sponsor

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

@prrace Only the author (@mickleness) is allowed to issue the integrate command. As this pull request is ready to be sponsored, and you are an eligible sponsor, did you mean to issue the /sponsor command?

@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

Going to push as commit ebb3d68.
Since your change was applied there have been 57 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 May 4, 2026
@openjdk openjdk Bot closed this May 4, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels May 4, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 4, 2026

@prrace @mickleness Pushed as commit ebb3d68.

💡 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.

3 participants