Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8089313

Transparent stage resize flickers on Mac

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0.2
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      Mac OS X Lion
      Apple Cinema Display (more than full HD resolution).
      High performance multicore Mac Pro with recent Radeon 5870 graphics card.

      Description

      Resizing the stage causes window flickering on Mac OS X Lion.

      To confirm that this is not just our application, I ran the "Advanced Area Chart" demo of the Ensemble application. Resizing the Ensemble window very fast on my Apple LED Cinema display at high resolution, caused moderate flickering - I could resize it perhaps 10-12 times moving my mouse back and forth rapidly and then it would do a full window flicker where the window is all black for perhaps 100 milliseconds.

      I am testing on a new high performance Mac Pro with a 1GB Radeon 5870 graphics card, so I expect the results to be worse on other systems.

      In my own application, the background is transparent because we render a window with rounded corners. In this app, the flickering looks extreme. Even just slowly dragging the resize handle of the window leads to constant full window flickering - it looks as if the window paints all transparent every second frame and fully rendered every other frame.

      I realize that the clear difference between my app and the Ensemble demo could prove that this is application specific. But it could also prove that running an application with

      stage.initStyle(StageStyle.TRANSPARENT);
      stage.setResizable(true);

      in general causes flickering on the Mac, because as soon as I remove the initStyle call, the flickering is reduced to what is seen in the Ensemble app.

      With StageStyle.TRANSPARENT I tried simplifying our app by removing all but one of my tabbed panes and showing only very little content, and the flickering is still extreme. I even restyled the app to replace the large gradient background with a solid color. Still the same extreme flickering.

      I improved the situation by adding
      setCache(true);
      to the root node of the scene. Now if I resize the window from 1920x1080 down to half the size, it flickers only perhaps 3-4 times in the process, and not every other frame as before. But it still flickers from fully transparent to fully painted and often enough to look pretty bad.

      I sincerely hope we will be able to fix this before our application is shown to customers, but I am afraid it is a bug in JavaFX.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ckyang Chien Yang (Inactive)
              Reporter:
              risaksen Randahl Isaksen
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: