Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice [v2]

2025-06-27 Thread Sergey Bylokhov
> This PR removes the usage of AppContext from the GraphicsDevice class. The > original use case was to store the full-screen window in some AppContext, > which was necessary in the context of plugin/appletviewer environments. > However, there is now effectively only one main AppContext, so this

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-27 Thread Alexander Zvegintsev
On Mon, 16 Jun 2025 06:17:32 GMT, Sergey Bylokhov wrote: > This PR removes the usage of AppContext from the GraphicsDevice class. The > original use case was to store the full-screen window in some AppContext, > which was necessary in the context of plugin/appletviewer environments. > However,

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-25 Thread Sergey Bylokhov
On Wed, 25 Jun 2025 14:59:53 GMT, Alexey Ivanov wrote: >> This PR removes the usage of AppContext from the GraphicsDevice class. The >> original use case was to store the full-screen window in some AppContext, >> which was necessary in the context of plugin/appletviewer environments. >> Howeve

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-25 Thread Sergey Bylokhov
On Tue, 24 Jun 2025 12:50:14 GMT, Alexey Ivanov wrote: >>>What I mean is two threads that called GraphicsDevice.getFullScreenWindow >>>still established a happens-before relation for each call, which will be >>>gone with the volatile modifier. >>>It may be fine… or may be not… this is why I'm a

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-25 Thread Alexey Ivanov
On Mon, 16 Jun 2025 06:17:32 GMT, Sergey Bylokhov wrote: > This PR removes the usage of AppContext from the GraphicsDevice class. The > original use case was to store the full-screen window in some AppContext, > which was necessary in the context of plugin/appletviewer environments. > However,

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-25 Thread Alexey Ivanov
On Sat, 21 Jun 2025 00:17:26 GMT, Sergey Bylokhov wrote: > That only affects the case where the second thread tries to read shared data > (unrelated to GraphicsDevice) without synchronization, which was written > before the first thread called getFullScreenWindow(). If visibility is > required

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-25 Thread Alexey Ivanov
On Tue, 24 Jun 2025 17:34:54 GMT, Sergey Bylokhov wrote: >>> That only affects the case where the second thread tries to read shared >>> data (unrelated to GraphicsDevice) without synchronization, which was >>> written before the first thread called getFullScreenWindow(). If visibility >>> is

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-20 Thread Sergey Bylokhov
On Fri, 20 Jun 2025 20:35:52 GMT, Alexey Ivanov wrote: >What I mean is two threads that called GraphicsDevice.getFullScreenWindow >still established a happens-before relation for each call, which will be gone >with the volatile modifier. >It may be fine… or may be not… this is why I'm asking.

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-20 Thread Alexey Ivanov
On Fri, 20 Jun 2025 20:28:43 GMT, Alexey Ivanov wrote: >>> I mean that there's a _happens before_ relation each time the synchronized >>> block is reach whereas with volatile, the _happens before_ relation is >>> guaranteed only when the value of the variable changes. >> >> I do not think that

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-20 Thread Alexey Ivanov
On Fri, 20 Jun 2025 20:12:52 GMT, Sergey Bylokhov wrote: >> I mean that there's a _happens before_ relation each time the synchronized >> block is reach whereas with volatile, the _happens before_ relation is >> guaranteed only when the value of the variable changes. > >> I mean that there's a

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-20 Thread Sergey Bylokhov
On Fri, 20 Jun 2025 18:55:30 GMT, Alexey Ivanov wrote: > I mean that there's a _happens before_ relation each time the synchronized > block is reach whereas with volatile, the _happens before_ relation is > guaranteed only when the value of the variable changes. I do not think that this is tru

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-20 Thread Alexey Ivanov
On Fri, 20 Jun 2025 01:23:23 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/java/awt/GraphicsDevice.java line 306: >> >>> 304: } >>> 305: // Set the full screen window >>> 306: synchronized (fsAppContextLock) { >> >> A `synchronized` block has stronger mem

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-19 Thread Sergey Bylokhov
On Thu, 19 Jun 2025 19:45:48 GMT, Alexey Ivanov wrote: >> This PR removes the usage of AppContext from the GraphicsDevice class. The >> original use case was to store the full-screen window in some AppContext, >> which was necessary in the context of plugin/appletviewer environments. >> Howeve

Re: RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-19 Thread Alexey Ivanov
On Mon, 16 Jun 2025 06:17:32 GMT, Sergey Bylokhov wrote: > This PR removes the usage of AppContext from the GraphicsDevice class. The > original use case was to store the full-screen window in some AppContext, > which was necessary in the context of plugin/appletviewer environments. > However,

RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

2025-06-18 Thread Sergey Bylokhov
This PR removes the usage of AppContext from the GraphicsDevice class. The original use case was to store the full-screen window in some AppContext, which was necessary in the context of plugin/appletviewer environments. However, there is now effectively only one main AppContext, so this indirec