Re: RFR: 8231372: JFXPanel fails to render if setScene called on Swing thread [v2]

2020-12-08 Thread Prasanta Sadhukhan
On Sat, 5 Dec 2020 13:42:21 GMT, Kevin Rushforth  wrote:

>> This fix was originally proposed by @mruzicka in PR #16 which was closed 
>> several months ago without being integrated. At the time we didn't have a 
>> test case that was failing.
>> 
>> While evaluating a bug that I filed, 
>> [JDK-8235843](https://bugs.openjdk.java.net/browse/JDK-8235843), I 
>> discovered that that bug was a duplicate of this one. The original proposed 
>> fix is correct, although I modified it slightly to add a try / finally so 
>> that the secondary event loop will be terminated even if the setScene throws 
>> an exception. I also added a unit test. Since the bulk of the fix is from PR 
>> #16, I will add the contributor of that PR.
>> 
>> NOTE to reviewers: I pushed two commits to my branch. The first is exactly 
>> the commit created for PR #16 and the second is the unit test along with the 
>> fix to the code to add try / finally. As always, they will be squashed into 
>> a single commit by Skara.
>
> Kevin Rushforth has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Dispose JFrame after each test

Marked as reviewed by psadhukhan (Reviewer).

-

PR: https://git.openjdk.java.net/jfx/pull/362


RFR: 8257758: Allow building of JavaFX native libs for Apple Silicon

2020-12-08 Thread Johan Vos
Fix for JDK-8257758

In case the -PtargetArch=arm64 option is supplied to the gradle build, the
native components that are part of the JavaFX build will target this platform.

-

Commit messages:
 - Allow to build an arm64-macos build

Changes: https://git.openjdk.java.net/jfx/pull/363/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=363&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257758
  Stats: 10 lines in 1 file changed: 9 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/363.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/363/head:pull/363

PR: https://git.openjdk.java.net/jfx/pull/363


Integrated: 8231372: JFXPanel fails to render if setScene called on Swing thread

2020-12-08 Thread Kevin Rushforth
On Fri, 4 Dec 2020 02:07:37 GMT, Kevin Rushforth  wrote:

> This fix was originally proposed by @mruzicka in PR #16 which was closed 
> several months ago without being integrated. At the time we didn't have a 
> test case that was failing.
> 
> While evaluating a bug that I filed, 
> [JDK-8235843](https://bugs.openjdk.java.net/browse/JDK-8235843), I discovered 
> that that bug was a duplicate of this one. The original proposed fix is 
> correct, although I modified it slightly to add a try / finally so that the 
> secondary event loop will be terminated even if the setScene throws an 
> exception. I also added a unit test. Since the bulk of the fix is from PR 
> #16, I will add the contributor of that PR.
> 
> NOTE to reviewers: I pushed two commits to my branch. The first is exactly 
> the commit created for PR #16 and the second is the unit test along with the 
> fix to the code to add try / finally. As always, they will be squashed into a 
> single commit by Skara.

This pull request has now been integrated.

Changeset: 794ffc09
Author:Kevin Rushforth 
URL:   https://git.openjdk.java.net/jfx/commit/794ffc09
Stats: 73 lines in 2 files changed: 66 ins; 1 del; 6 mod

8231372: JFXPanel fails to render if setScene called on Swing thread

Correctly terminate secondary event loop in JFXPanel::setScene

Co-authored-by: Michal Růžička 
Reviewed-by: psadhukhan, arapte

-

PR: https://git.openjdk.java.net/jfx/pull/362


RFR: 8257719: JFXPanel scene fails to render correctly on HiDPI after fix for JDK-8199592

2020-12-08 Thread Jose Pereda
This PR fixes a regression introduced in 
[JDK-8199592](https://bugs.openjdk.java.net/browse/JDK-8199592), where scene 
initialization was moved after updating output scales. However, in case of 
embedded windows (used by `JFXPanel` or `FXCanvas`), the scene has to be 
initialized before.

A test has been included. Before applying the fix, the JFXPanel is rendered 
with a garbled image, and after the fix, the rendering is correct.

-

Commit messages:
 - Initialize scene of embedded windows before updating output scales, 
including test

Changes: https://git.openjdk.java.net/jfx/pull/364/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=364&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257719
  Stats: 180 lines in 2 files changed: 179 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/364.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/364/head:pull/364

PR: https://git.openjdk.java.net/jfx/pull/364


RFR: 8257897: Fix webkit build for XCode 12

2020-12-08 Thread Arun Joseph
The WebKit build fails with recent Xcode 12.

Bug: `getVTablePointer()` should return a const void*

Fix: Use const void* and remove dependency on JavaVM.framework in Xcode
Upstream fix: https://bugs.webkit.org/show_bug.cgi?id=207871

Test: Build webkit with the Xcode 12 compiler with and without this fix. It 
should fail without the fix and build with the fix.

-

Commit messages:
 - 8257897: Fix webkit build for XCode 12

Changes: https://git.openjdk.java.net/jfx/pull/365/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=365&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257897
  Stats: 8 lines in 3 files changed: 0 ins; 4 del; 4 mod
  Patch: https://git.openjdk.java.net/jfx/pull/365.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/365/head:pull/365

PR: https://git.openjdk.java.net/jfx/pull/365


RFR: 8256983: GitHub actions: specify the version of each platform OS and compiler

2020-12-08 Thread Kevin Rushforth
As described in the [JBS 
issue](https://bugs.openjdk.java.net/browse/JDK-8256983), we should specify the 
specific version of each OS and compiler rather than just using the defaults. 
This will help insulate us from changes to the defaults that can break the 
build, and has recently done so.

On Linux, we upgraded to 20.04 (18.04 is still the default), which required 
specifying the version of ant, since the default version for 20.04 is 1.10.7 
which has a bug that causes FX apps to fail. I decided to also specify the 
version of ant (1.10.5) for all three platforms.

The following will be used:

| Platform | OS | Compiler | Ant |
| --- | --- | --- | --- |
| Linux | Ubuntu 20.04 | gcc 10.2 | ant 1.10.5 |
| Mac | macOS 10.15 | Xcode 11.3.1 | ant 1.10.5 |
| Windows | Windows Server 2019 | [1] | ant 1.10.5 |

[1] The Microsoft compiler version is unspecified as there is a dependency on 
[JDK-8255713](https://bugs.openjdk.java.net/browse/JDK-8255713) in addition to 
the problem of increasing the build time to download a specific version.

-

Commit messages:
 - 8256983: GitHub actions: specify the version of each platform OS and compiler

Changes: https://git.openjdk.java.net/jfx/pull/366/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=366&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256983
  Stats: 46 lines in 1 file changed: 34 ins; 0 del; 12 mod
  Patch: https://git.openjdk.java.net/jfx/pull/366.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/366/head:pull/366

PR: https://git.openjdk.java.net/jfx/pull/366


Re: RFR: 8257719: JFXPanel scene fails to render correctly on HiDPI after fix for JDK-8199592

2020-12-08 Thread Kevin Rushforth
On Tue, 8 Dec 2020 16:29:52 GMT, Jose Pereda  wrote:

> This PR fixes a regression introduced in 
> [JDK-8199592](https://bugs.openjdk.java.net/browse/JDK-8199592), where scene 
> initialization was moved after updating output scales. However, in case of 
> embedded windows (used by `JFXPanel` or `FXCanvas`), the scene has to be 
> initialized before.
> 
> A test has been included. Before applying the fix, the JFXPanel is rendered 
> with a garbled image, and after the fix, the rendering is correct.

Looks good with one minor comment.

tests/system/src/test/java/test/robot/javafx/embed/swing/JFXPanelHiDPITest.java 
line 166:

> 164: }
> 165: 
> 166: }

Minor: missing newline at end of file

-

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/364


Re: RFR: 8257758: Allow building of JavaFX native libs for Apple Silicon

2020-12-08 Thread Kevin Rushforth
On Tue, 8 Dec 2020 11:00:43 GMT, Johan Vos  wrote:

> Fix for JDK-8257758
> 
> In case the -PtargetArch=arm64 option is supplied to the gradle build, the
> native components that are part of the JavaFX build will target this platform.

I haven't tested it yet. I made a naming suggestion, but otherwise looks OK.

buildSrc/mac.gradle line 32:

> 30: 
> 31: def TARGET_ARCH = "x86_64"
> 32: if (hasProperty('targetArch')) {

Normally, our external gradle properties are all upper-case, so `TARGET_ARCH` 
might be a better name for the property and `targetArch` a better name for the 
local variable.

buildSrc/mac.gradle line 130:

> 128: 
> 129: if (hasProperty('targetArch')) {
> 130: commonParams = ["-target", "$TARGET_ARCH-apple-macos-11", 
> commonParams]

Maybe surround the variable with curly braces to make it clearer?

-

PR: https://git.openjdk.java.net/jfx/pull/363


Re: RFR: 8257719: JFXPanel scene fails to render correctly on HiDPI after fix for JDK-8199592 [v2]

2020-12-08 Thread Jose Pereda
> This PR fixes a regression introduced in 
> [JDK-8199592](https://bugs.openjdk.java.net/browse/JDK-8199592), where scene 
> initialization was moved after updating output scales. However, in case of 
> embedded windows (used by `JFXPanel` or `FXCanvas`), the scene has to be 
> initialized before.
> 
> A test has been included. Before applying the fix, the JFXPanel is rendered 
> with a garbled image, and after the fix, the rendering is correct.

Jose Pereda has updated the pull request incrementally with one additional 
commit since the last revision:

  Add new line at the end of the test file

-

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/364/files
  - new: https://git.openjdk.java.net/jfx/pull/364/files/8c81e317..4eb1ace5

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=364&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=364&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jfx/pull/364.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/364/head:pull/364

PR: https://git.openjdk.java.net/jfx/pull/364


Re: RFR: 8257719: JFXPanel scene fails to render correctly on HiDPI after fix for JDK-8199592 [v2]

2020-12-08 Thread Kevin Rushforth
On Tue, 8 Dec 2020 21:34:46 GMT, Jose Pereda  wrote:

>> This PR fixes a regression introduced in 
>> [JDK-8199592](https://bugs.openjdk.java.net/browse/JDK-8199592), where scene 
>> initialization was moved after updating output scales. However, in case of 
>> embedded windows (used by `JFXPanel` or `FXCanvas`), the scene has to be 
>> initialized before.
>> 
>> A test has been included. Before applying the fix, the JFXPanel is rendered 
>> with a garbled image, and after the fix, the rendering is correct.
>
> Jose Pereda has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Add new line at the end of the test file

Marked as reviewed by kcr (Lead).

-

PR: https://git.openjdk.java.net/jfx/pull/364


Re: RFR: 8257897: Fix webkit build for XCode 12

2020-12-08 Thread Kevin Rushforth
On Tue, 8 Dec 2020 17:29:56 GMT, Arun Joseph  wrote:

> The WebKit build fails with recent Xcode 12.
> 
> Bug: `getVTablePointer()` should return a const void*
> 
> Fix: Use const void* and remove dependency on JavaVM.framework in Xcode
> Upstream fix: https://bugs.webkit.org/show_bug.cgi?id=207871
> 
> Test: Build webkit with the Xcode 12 compiler with and without this fix. It 
> should fail without the fix and build with the fix.

Looks good. I tested it with both Xcode 11.3.1 and Xcode 12.2.

-

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/365


Integrated: 8257897: Fix webkit build for XCode 12

2020-12-08 Thread Arun Joseph
On Tue, 8 Dec 2020 17:29:56 GMT, Arun Joseph  wrote:

> The WebKit build fails with recent Xcode 12.
> 
> Bug: `getVTablePointer()` should return a const void*
> 
> Fix: Use const void* and remove dependency on JavaVM.framework in Xcode
> Upstream fix: https://bugs.webkit.org/show_bug.cgi?id=207871
> 
> Test: Build webkit with the Xcode 12 compiler with and without this fix. It 
> should fail without the fix and build with the fix.

This pull request has now been integrated.

Changeset: 7fa02fe2
Author:Arun Joseph 
URL:   https://git.openjdk.java.net/jfx/commit/7fa02fe2
Stats: 8 lines in 3 files changed: 0 ins; 4 del; 4 mod

8257897: Fix webkit build for XCode 12

Reviewed-by: kcr

-

PR: https://git.openjdk.java.net/jfx/pull/365