Re: RFR: 8150709: Mac OSX and German Keyboard Layout (Y/Z) [v5]

2022-01-02 Thread Martin Fox
On Mon, 20 Dec 2021 12:11:11 GMT, Johan Vos  wrote:

>> Martin Fox has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains five additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' into macshortcut
>>  - Fixed whitespace error.
>>  - A small number of keyboard layouts require the Option key to reach
>>critical letters like 'Q'. Added a third probe (after Command and
>>Shift+Command) to look for letters that require Option. The
>>keyboards in question are Azeri, Turkmen, and the Sami layouts.
>>  - The code now queries both the shifted and unshifted characters for a key
>>favoring digits and letters over everything else. This ensures we catch
>>the digits on the French layout without interfering with Dvorak.
>>  - Mac - generate KeyCodes that match user's active keyboard layout.
>
> This looks ok, but I'm still a bit worried about possible regression. I 
> understand that rigorous automated tests are hard in this case, but I wonder 
> if we can have some basic tests at least.
> Is there an issue in the Robot implementation preventing this?

@johanvos I thought about your questions some more and decided to expand my 
KeyboardTest app. A new version is attached. The tests now cover as many keys 
as possible on German, French, and U.S. English layouts on Windows, Mac, and 
Linux. There are also tests for generic Latin and non-Latin layouts that check 
for proper behavior of KeyCodes A through Z, namely that they always generate 
characters and on Latin layouts those characters are ‘a’ through ‘z’.

The tests don’t cover dead keys or the top-row function keys because there’s 
too much variation across platforms. They also can’t cover keys that aren’t 
assigned KeyCodes like accented character keys.

On Windows and Linux the biggest barrier to testing is the buggy Robot code. If 
you want to use this test app on Windows you’ll need to pull down PR #702. I’ll 
submit a PR for Linux this week. For now I would avoid the combination tests 
because they fail more often than not (but I’m working on that with PR #694) 
and aren't related to this PR.

If we assume a Latin keyboard we can easily automate testing for about 60 keys 
(letters, portions of the keypad, Space, Tab, Home, End, and so on). I’ll look 
into creating an expanded automated test. But I still have no good plan for 
addressing punctuation and symbols which is historically where most of the bugs 
have been and the tests will only be useful if they are regularly run on a 
variety of different keyboard layouts.

I'm not sure what to do with this test app. I would like to get it into the 
codebase since it’s useful for testing Robot fixes but there are three PR’s 
involved, this one for Mac, #702 for Windows, and an upcoming one for Linux.

[KeyboardTest.txt](https://github.com/openjdk/jfx/files/7800066/KeyboardTest.txt)

-

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


Re: RFR: 8234921: Add DirectionalLight to the selection of 3D light types [v6]

2022-01-02 Thread Ambarish Rapte
On Mon, 20 Dec 2021 13:13:09 GMT, Nir Lisker  wrote:

>> Adds a directional light as a subclass of `LightBase`. I think that this is 
>> the correct hierarchy for it.
>> 
>> I tried to simulate a directional light by putting a point light far away, 
>> but I got artifacts when the distance was large. Instead, I added an on/off 
>> attenuation flag as the 4th component of the attenuation 4-vector. When it 
>> is 0, a simpler computation is used in the pixel/fragment shader that 
>> calculates the illumination based on the light direction only (making the 
>> position variables meaningless). When it is 1, the point/spot light 
>> computation is used. It's possible that the vertex shader can also be 
>> simplified in this case since it does not need to transform the position 
>> vectors, but I left this optimization avenue for another time.
>> 
>> I noticed a drop of ~1 fps in the stress test of 5000 meshes.
>> 
>> I added a system test that verifies the correct color result from a few 
>> directions. I also updated the lighting sample application to include 3 
>> directional lights and tested them on all the models visually. The lights 
>> seem to behave the way I would expect.
>
> Nir Lisker has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Added import

Marked as reviewed by arapte (Reviewer).

-

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


JDK-8088535 Memory Leak

2022-01-02 Thread Eric Bresie
Noticed a recent tweet (1) about an older memory leak issue (2) and was
curious if with recent performance and memory changes if anyone can confirm
if this is still an issue or if it has been resolved as part of the recent
changes.  There appears to be a test attached to the original issue.

Eric

References:
(1) https://twitter.com/dlemmermann/status/1477340490299330566?s=21

(2) https://bugs.openjdk.java.net/browse/JDK-8088535
-- 
Eric Bresie
ebre...@gmail.com