JavaFX Content Rendering & Resizing and Font Bugs In Linux
Ty Young
youngty1997 at gmail.com
Wed Jan 16 02:36:21 UTC 2019
On 1/13/19 5:33 PM, John Neffenger wrote:
> On 1/12/19 10:20 PM, Ty Young wrote:
>> Seeing as how this important issue is seemingly being ignored, I've
>> decided to upload a video showcases the bugs[1]. If this isn't
>> evidence that there is a problem with JavaFX's content rendering,
>> resizing, and fonts I don't know what is.
>
> Your video looks similar to a bug I first encountered two years ago
> [1]. I was reluctant to reply earlier because I can't reproduce the
> bug in a windowed environment. So far I have seen the problem in the
> two cases listed below (the bug report lists only the first case):
>
> (a) on a Monocle platform using an off-screen composition buffer that
> is allocated as a non-direct byte buffer, and
>
> (b) on a Monocle platform using the frame buffer directly as the
> composition buffer, and its horizontal visible resolution differs from
> its virtual resolution.
>
> If I play your videos at the slowest speed, I see the entire frame
> jump up when you resize its window. That is just what you would expect
> if the position of the buffer was reset to zero while the buffer was
> being used to draw the frame.
...and can cause undefined behavior like horizontal scrollbars showing
when they shouldn't I assume?
Does JavaFX only have one frame buffer? If so, would it not be possible
(and safer) to have a primary buffer and a secondary "prefetch" frame
buffer to safely create the next frame buffer to ensure that this
doesn't happen? So that:
1. UI update happens(resize, control clicked, etc)
2. "prefetch" buffer immediately draws the next frame and keeps drawing
frames if UI updates keep happening
3. primary buffer is replaced with the newest complete "prefetch" buffer
In otherwords, similar to double and triple buffering. Of course, just
like with double/triple buffering this can cause side affects.
>
> Our environments are very different, and your problem may have origins
> outside of JavaFX entirely, but it may still be worth trying the same
> debugging technique described in the bug report.
The waving Duke project no longer works in JavaFX 11. Is there an easy
way to do similar in any JavaFX project using the latest JavaFX?
I created a new JavaFX/JDK build with the submitted commit and it
doesn't improve anything. It could just be placebo but it may have
actually made it worse.
>
> John
>
> [1] See: https://bugs.openjdk.java.net/browse/JDK-8201567
> or: https://gitlab.com/openjfxepd/jfxpatch/issues/1
More information about the openjfx-dev
mailing list