A clean backport. The fix is necessary for avoiding a Metal crash on macOS VM.
------------- Commit messages: - Backport 3ae6bc00b803517941d3459641b0c66b749beecf Changes: https://git.openjdk.org/jfx/pull/2062/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2062&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8375466 Stats: 25 lines in 2 files changed: 25 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/2062.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2062/head:pull/2062 PR: https://git.openjdk.org/jfx/pull/2062
