RFR: 8201567: QuantumRenderer modifies buffer in use by JavaFX Application Thread [v2]
arapte at openjdk.java.net
Wed Jul 8 17:47:43 UTC 2020
On Thu, 2 Jul 2020 23:48:08 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>>> Does this fix the years old Linux JavaFX buffer reset bug?
>> Possibly. This is a race condition that can affect the use of `UploadingPainter`, which is used by the SW pipeline.
> This fix might be a candidate for JavaFX 15, so I recommend to _not_ merge the master branch.
> If we don't spot anything of concern during the review, then we might ask you to retarget your PR to the `jfx15` branch.
This seems to be a safe fix to me. As mentioned in `Pixels.java`, the class is not thread safe but most of the other
methods have the check `Application.checkEventThread()`, so those methods seem safe. But the the method `getPixels()`
does not have this check, as it is at least accessed by two threads. The new method `getBuffer()` is a true get method
and more correct for comparing the buffers.
More information about the openjfx-dev