On Wed, 20 Jul 2022 19:33:43 GMT, Phil Race <[email protected]> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> JDK-8271395
>> QuantumRenderer is no longer public
>
> modules/javafx.graphics/src/main/java/com/sun/prism/impl/Disposer.java line
> 131:
>
>> 129: */
>> 130: public static void cleanUp() {
>> 131: if
>> (!Thread.currentThread().getName().startsWith("QuantumRenderer")) {
>
> This seemed like a dubious way to detect the render thread so I looked around
> for how it is done elsewhere but instead I found
> com/sun/javafx/sg/prism/NGCanvas.java
> private static void runOnRenderThread(final Runnable r) {
> // We really need a standard mechanism to detect the render thread !
> if (Thread.currentThread().getName().startsWith("QuantumRenderer")) {
>
> And .. it is also used by printing, and I added it in 2013 :-(
>
> In my defence I copied the code from webview as mentioned in
> https://bugs.openjdk.org/browse/JDK-8094524
>
> oh well.
Thanks, Phil, for digging into this. I was going to question it as well.
I'll file a follow-on bug to add such a method (not super urgent, but it would
be worth having a consistent way to do this). I see that I suggested filing
such an issue in the JBS issue Phil pointed to, but didn't do it.
-------------
PR: https://git.openjdk.org/jfx/pull/618