Hi Sergey,

The fix looks good for me. Looking forward to your pull request.

Best Regards,
Alexey

> On 30 Aug 2020, at 03:45, Sergey Bylokhov <sergey.bylok...@oracle.com> wrote:
> 
> On 29.08.2020 17:39, Phil Race wrote:
>> Sergey,
>> The priority now is to flush outstanding review requests ahead of the skara 
>> transition. I should have made that clearer in my email but I think new 
>> requests such as this will need to wait. Especially anything that requires 
>> some deep thought by a reviewer as we have just one working day left.
> 
> It is not a big deal to convert such a request to the PR. So I will work to
> the usual rhythm and convert all review requests to PR once we moved to the 
> github.
> 
>> -Phil.
>>> On Aug 29, 2020, at 5:29 PM, Sergey Bylokhov <sergey.bylok...@oracle.com> 
>>> wrote:
>>> 
>>> Hello.
>>> Please review the fix for jdk/client.
>>> 
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8252133
>>> Fix: http://cr.openjdk.java.net/~serb/8252133/webrev.00
>>> 
>>> This bug easily reproduced by the test in question on the dual video card 
>>> systems
>>> when the metal pipeline is active. But it is possible to reproduce it in 
>>> the OGL
>>> pipeline as well, but it is required some additional steps.
>>> 
>>> 
>>> Problem description:
>>>  Our CGraphicsEnvironment maintains the list of active graphics devices. 
>>> The one
>>> important feature of this CGraphicsEnvironment is to invalidate the old 
>>> devices and
>>> map them to the new devices. For example, if the user got a reference to 
>>> the device,
>>> and this device was removed then this reference will refer to the main 
>>> screen.
>>> 
>>> The problem in the current implementation arise when the system has two 
>>> video cards:
>>> 1 The user get some GraphicsDevice
>>> 2 The user sets the full-screen window for this device
>>> 3 The user change screen resolution for this device
>>> 4 The resolution of the screen is not changed ->> BUG.
>>> 
>>> The problem is that somewhere after step 1 or 2 and before step 3 the macOS 
>>> decided
>>> to switch to the discrete video card, but it does not report the old 
>>> device(integrated VC)
>>> as removed, because actually no screens were removed.
>>> 
>>> Since it was not reported as removed we did not invalidate it and did not 
>>> map it to the
>>> new device ->> request to change the screen resolution at step 3 send to 
>>> some non existed
>>> deviceID.
>>> 
>>> As a fix I suggest to change this logic:
>>> - Invalidate devices reported by macOS as removed
>>> - Initialize the main screen
>>> - Initialize all NEW screens
>>> 
>>> To this logic:
>>> - Ignore devices reported by the macOS as removed
>>> - Initialize the main screen
>>> - Initialize all NEW screens
>>> - Check that the main device is in the list of all NEW devices
>>> - Invalidate all OLD devices which are not in the list of NEW devices
>>> 
>>> 
>>> -- 
>>> Best regards, Sergey.
> 
> 
> -- 
> Best regards, Sergey.

Reply via email to