On Thu, 20 May 2021 21:48:18 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> This PR addresses some cleanup activities : >> - Cleaned up MTLSurfaceDataBase.h & MTLSurfaceData.m >> - Removed OpenGL references from MTLPipelineStatesStorage.m & >> MTLRenderQueue.m > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m > line 35: > >> 33: #include "jlong.h" >> 34: >> 35: jboolean MTLSD_InitMTLWindow(JNIEnv *env, BMTLSDOps *bmtlsdo); > > How the MTLSD_WINDOW is used? Do we use it for the layer-based rendering? It is used in MTLContex.m. It just indicates a surface that we render to. We blit from this surface to the CAMetalLayer lateron. It looks like MTLSD_WINDOW can be replaced with simple MTLSD_TEXTURE. This investigation and cleanup has already been identified during lanai code review (Bug - JDK-8263463) > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceDataBase.h > line 56: > >> 54: * jint x/yOffset; >> 55: * The offset in pixels of the viewport origin from the lower-left >> 56: * corner of the heavyweight drawable. > > Do we use these fields or they are always zero? Thanks for your review. It turned out that - they are always zero. I will remove these fields. ------------- PR: https://git.openjdk.java.net/jdk/pull/4010