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

Use DirectX 9Ex mechanism to avoid calling cv.save()

XMLWordPrintable

      Comparing the SceneGraph and Canvas versions of BitmapTest w/ 600 monsters at fullspeed, SceneGraph shows a big speed advantage over canvas:

      Canvas: 110 fps
      SG: 330 fps

      This is primarily due to the call to cv.save() in NGCanvas.renderContent(). Without it, we see a big performance boost:

      Canvas w/o cv.save(): 350 fps

      cv.save() is there to save the contents of the canvas so we can guarantee persistence when the screen is locked and the HW buffers are lost. So we're reading the pixels back on every frame.

      Once we move to DX10, there is a mechanism where they can save the buffers for us only when the surfaces are lost.

            kprazdnikwse Kirill.Prazdnikov (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: