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

Implement JEP 382: New macOS Rendering Pipeline

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 17
    • client-libs
    • 2d
    • behavioral
    • low
    • This is a substantial new piece of code and it may not render or perform identically.
    • System or security property
    • Implementation

      Summary

      Provide a new implementation system property to enable the Java 2D Metal rendering pipeline for macOS.

      Problem

      Java 2D has previously supported only OpenGL for on-screen rendering on macOS. With the delivery of the new Metal API rendering pipeline, and since Metal will be "off by default", we need a way to turn it on.

      Solution

      Follow the established pattern used on other platforms where there are multiple pipelines and provide an implementation system property "sun.java2d.metal" which can be used to select this new optional pipeline.

      Specification

      The system property name is "sun.java2d.metal" and a value specified as -Dsun.java2d.metal = "t" | "T" | "true" | "True" | "" will request the Metal API pipeline to be used where it is available and supported.

      In the event that metal becomes the default and an alternative pipeline is available, Metal can be disabled by specifying

      -Dsun.java2d.metal= "f" | "F" | "false" | "False"

      The options with an initial capital letter are verbose options which cause a message to be printed to System.out confirming whether the Metal pipeline was enabled.

      On platforms other than macOS this system property has no effect.

            prr Philip Race
            aghaisas Ajit Ghaisas
            Ajit Ghaisas, Alexey Ushakov, Jayathirth D V, Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: