RFR: 8310054: ScrollPane insets are incorrect
Alexey Ivanov
aivanov at openjdk.org
Thu Jun 15 22:53:58 UTC 2023
On Thu, 15 Jun 2023 21:14:06 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> @aivanov-jdk If just the `_SetSpans()` on native is changed to run as `InvokeFunction` instead of `InvokeFunctionLater` both the tests - ScrollPaneLeakTest.java & ScrollPaneExtraScrollBar.java pass without additional code changes to WScrollPanePeer.java.childResized and _setInsets.
I know it. But I think it's bad. If both `_SetSpans` and `_SetInsets` are synchronous by using `InvokeFunction`, you block EDT to run some code on the toolkit thread twice:
1. EDT calls `_SetSpans`, it gets blocked until `SetSpans` completes on the toolkit thread;
2. EDT calls `_SetInsets`, it gets blocked until `SetInsets` completes on the toolkit thread.
I think blocking is bad. I coalesced these two calls into one asynchronous call. There's no EDT blocking with the same result.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14478#issuecomment-1593817579
More information about the client-libs-dev
mailing list