RFR: 8259825: Find a better way to detect Metal framework availability on system

Ajit Ghaisas aghaisas at openjdk.java.net
Tue Mar 9 12:15:33 UTC 2021

**Issue :** 
In Lanai code-base, system profiler command was used to detect Metal framework availability. This implementation although works as expected, is slower.

**Fix :** 
I have replaced the logic that was using system profiler command with @available check for macOS Mojave (10.14)

**More Info :** 
https://support.apple.com/en-us/HT205073 - mentions the HW that supports Metal framework. It is practically difficult to detect HW and then decide whether Metal framework is supported or not.
Instead, it is appropriate to check for OS version that guarantees Metal framework availability.
Please refer - https://support.apple.com/en-us/HT208898 - It is mentioned in the first line @ this link that "macOS Mojave requires a graphics card that supports Metal"


Commit messages:
 - metal availability check

Changes: https://git.openjdk.java.net/lanai/pull/212/files
 Webrev: https://webrevs.openjdk.java.net/?repo=lanai&pr=212&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259825
  Stats: 34 lines in 1 file changed: 0 ins; 31 del; 3 mod
  Patch: https://git.openjdk.java.net/lanai/pull/212.diff
  Fetch: git fetch https://git.openjdk.java.net/lanai pull/212/head:pull/212

PR: https://git.openjdk.java.net/lanai/pull/212

More information about the lanai-dev mailing list