On Mon, 8 Feb 2021 18:05:02 GMT, Gerard Ziemski <gziem...@openjdk.org> wrote:
>> Ajit Ghaisas has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Lanai PR#175 - 8261304 - aghaisas > > src/java.desktop/macosx/classes/sun/java2d/metal/MTLRenderQueue.java line 97: > >> 95: public static void disposeGraphicsConfig(long pConfigInfo) { >> 96: MTLRenderQueue rq = getInstance(); >> 97: rq.lock(); > > Is it allowed to have multiple `MTLRenderQueue` instances? > > If not, then I see this pattern everywhere: > > MTLRenderQueue rq = getInstance(); > rq.lock(); > { > ... > } > rq.unlock(); > why not just do: > > MTLRenderQueue.lock(); > { > ... > } > MTLRenderQueue.unlock(); > > and have `MTLRenderQueue.lock()` and `MTLRenderQueue.unlock()` implement > getting the actual lock instance and locking/unlocking it? Thanks for the recommendation. This is a common behavior among different pipelines : D3D, OpenGL and Metal. Mentioned lock/unlock should be implemented in parent RenderQueue class after refactoring and it will hit other pipelines. Its better to not touch other pipelines as part of this JEP. ------------- PR: https://git.openjdk.java.net/jdk/pull/2403