We have many if else conditions to select OpenGL/Metal pipeline objects. Apart from initialization phase we should not fetch these objects everytime checking whether we are using OpenGL/Metal pipeline.
------------- Commit messages: - 8226384: Implement a better logic to switch between OpenGL and Metal pipeline Changes: https://git.openjdk.java.net/jdk/pull/3851/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3851&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8226384 Stats: 111 lines in 5 files changed: 57 ins; 42 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/3851.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3851/head:pull/3851 PR: https://git.openjdk.java.net/jdk/pull/3851