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

Direct3D Acceleration does not work with unsigned applications

XMLWordPrintable

      JavaFX 1.2 applications that are run in the sandbox are not able to take advantage of Direct3D acceleration, and will default to CPU/SIMD instead.

      Here is a simple example that can be used to reproduce this issue:
      var graphicsConfig = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
      println(DropShadow {}.getAccelType(graphicsConfig));

      When run from with full permissions it will return the expected value of : Direct3D
      When run from within an unsigned webstart application it will return: CPU/SIMD

      You can simulate the same exception by trying to access the RSLRender class directly:
      Class.forName("com.sun.scenario.effect.impl.j2d.rsl.RSLRenderer");

      Which will result in the following exception:
      java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.java2d.pipe.hw)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at org.jfxtras.scene.effect.RenderTest.javafx$run$(RenderTest.fx:12)

      Credit to Steven Herod for uncovering this issue with his Leadfoot acceleration testing program:
      http://blogs.herod.net/javafx/2009/07/javafx-effects-and-hardware-acceleration/

            tdv Dmitri Trembovetski (Inactive)
            schin Stephen Chin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: