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

Various problems in test program

    Details

      Description

      Originally I have written the attached test program to compare the
      rendering performance of various shape types but finally this program
      unveiled a lot of other problems which I want to report here.


      ToolBar items not updated
      -------------------------------------

      When I start the program everything seems to be fine at the beginning.
      The program shows a tool bar and a drawing area with a lot of triangles.
      The tool bar contains two toggle buttons. The first one toggles between
      triangles and rectangles. If I hit this toggle button several times
      (10 - 20 times on my machine) the visual state indication of the button
      does not change anymore although the toggling itself still works.
      Also the blue focus indication does not change anymore when I select
      for example the first text box. When I finally change the window size
      slightly everything goes back to normal.


      ScrollEvents are swallowed when animation is running.
      ----------------------------------------------------------------------------

      You can zoom in and out in the drawing area via the mouse wheel.
      But when you start the animation a lot of scroll events seem to
      be swallowed. Sometimes it works, sometimes there are no events
      at all. The behavior is somewhat unpredictable but all in all
      the zoom experience is very bad.


      Maximizing window does not trigger change listener.
      -------------------------------------------------------------------------

      When the window is resized the graphics is adjusted
      to always fill the whole drawing area. This is triggered
      by a change listener on the graphicsPane. This seems to
      work nicely when I adjust the window size manually with the
      mouse. But if I hit the maximize button in the upper right
      corner of the window this does not seem to trigger the
      change listener, which I do not understand. (This works
      if I attach the listener to the drawingPane instead.)
      Even worse, when I hit the button again to go back to
      the original size, the application dies with a StackOverflowError.
      See attached file 'rsize_exception.txt'.


      Not setting the clipping rectangle crashes application
      ------------------------------------------------------

      In order not to draw outside of the bounds of the drawingPane
      I set a clipping Rectangle. This works nicely although it is
      a bit of a pain that we still have to do that manually.
      But even worse if you don't do that the whole application
      crashes at startup caused by a StackOverfowError. I'd rather
      expect some drawing artifacts on the tool bar but not a crash
      of the application.


      Conclusion
      ----------------

      There may be bugs in my code (although in general it seems to
      work correctly) or there may be alternative ways to implement
      the desired behavior but I am a bit astonished to see how
      sensitive JavaFX is.

      Ah, and finally, are there any plans for the next release to
      improve the rendering performance of path based shapes? At the
      moment you cannot even render simple triangles with an acceptable
      speed. For the triangle case the performance is 3-5 times better if
      you run the application with -Dprism.order=j2d

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              dpausjfx Dr. Michael Paus (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: