<AWT Dev>  review request for JDK-8014227: JLightweightFrame needs another synchronization policy
Anton V. Tarasov
anton.tarasov at oracle.com
Tue May 14 23:43:54 PDT 2013
On 14.05.2013 16:27, Anton V. Tarasov wrote:
> Hi Artem,
> Thanks for the review.
> As I can see, GetBooleanAction provides no way to distinguish "false" from "dosn't exist" The
> latter should be treated as "true" in my case, so I'm afraid I can't use it...
...unless I rename the field to copyBufferDisabled or directBufferEnabled, but the former is
negative and the latter will require reversing the comments which I would prefer not change.
> On 14.05.2013 14:45, Artem Ananiev wrote:
>> Hi, Anton,
>> the changes look fine. You can also consider using GetBooleanAction instead of GetPropertyAction
>> to get "jlf.copyBufferEnabled" value.
>> On 5/8/2013 6:54 PM, Anton V. Tarasov wrote:
>>> Please review the fix.
>>> bug: https://jbs.oracle.com/bugs/browse/JDK-8014227
>>> webrev: http://cr.openjdk.java.net/~ant/JDK-8014227/webrev.0
>>> The fix changes the JLightweightFrame synchronization policy in order to
>>> resolve the deadlock which its client, jfx SwingNode, faces on Mac.
>>> The new policy is based on introducing a duplicating pixel buffer which
>>> is then shared b/w JLF and its client.
>>> The buffer's content is synchronized with the original pixel buffer and
>>> the paintLock narrows down its scope to the copying function.
>>> This allows to avoid blocking EDT simultaneously with holding the lock
>>> (see the bug report for more details, please).
More information about the awt-dev