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

Create "CommandBuffer" for storing graphics drawing commands in Prism

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P2 P2
    • tbd
    • None
    • javafx

      Often Prism has to render a node which has not actually changed -- either because something transparent over top that node has changed or the window was resized etc. In such cases, we recompute a ton of information and then ask OpenGL / D3D / Software to draw. Instead, we should retain a "CommandBuffer" of drawing commands. We construct this once, and then as long as the Node hasn't changed, when we are asked to draw again, we simply iterate (perhaps in native code) this command buffer and issue drawing commands, rather than having to recompute all the drawing state.

      We should make sure that we can avoid having to recreate all the drawing commands when a Node simply moves from one place to another, or whenever something like the fill changes. In such cases if we can reconstruct only that part of the command buffer that has changed, we would have some performance advantage even in the case that the node has changed in some way, but not in every way. Of course this will increase memory footprint per node.

      However, we need to make sure that the case of a node being moved is exceptionally fast and does not require recomputing the command buffer, or we will not see performance gains in many cases.

            Unassigned Unassigned
            rbair Richard Bair (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Imported: