diff --git a/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java b/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java index 88fdb2b65a5..d28c2aac111 100644 --- a/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java +++ b/src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java @@ -70,7 +70,8 @@ public CGraphicsDevice(final int displayID) { this.displayID = displayID; if (MacOSFlags.isMetalEnabled()) { - // Try to create MTLGraphicsConfig, if it fails, try to create CGLGraphicsConfig as a fallback + // Try to create MTLGraphicsConfig, if it fails, + // try to create CGLGraphicsConfig as a fallback this.config = MTLGraphicsConfig.getConfig(this, displayID); if (this.config != null) { @@ -78,7 +79,9 @@ public CGraphicsDevice(final int displayID) { } else { // Try falling back to OpenGL pipeline if (MacOSFlags.isMetalVerbose()) { - System.out.println("Metal rendering pipeline initialization failed. Using OpenGL rendering pipeline."); + System.out.println("Metal rendering pipeline" + + " initialization failed,using OpenGL" + + " rendering pipeline"); } this.config = CGLGraphicsConfig.getConfig(this); @@ -88,7 +91,8 @@ public CGraphicsDevice(final int displayID) { } } } else { - // Try to create CGLGraphicsConfig, if it fails, try to create MTLGraphicsConfig as a fallback + // Try to create CGLGraphicsConfig, if it fails, + // try to create MTLGraphicsConfig as a fallback this.config = CGLGraphicsConfig.getConfig(this); if (this.config != null) { @@ -96,7 +100,9 @@ public CGraphicsDevice(final int displayID) { } else { // Try falling back to Metal pipeline if (MacOSFlags.isOGLVerbose()) { - System.out.println("OpenGL rendering pipeline initialization failed. Using Metal rendering pipeline."); + System.out.println("OpenGL rendering pipeline" + + " initialization failed,using Metal" + + " rendering pipeline"); } this.config = MTLGraphicsConfig.getConfig(this, displayID); @@ -110,7 +116,8 @@ public CGraphicsDevice(final int displayID) { if (!metalPipelineEnabled && !oglPipelineEnabled) { // This indicates fallback to other rendering pipeline also failed. // Should never reach here - throw new InternalError("Error - unable to initialize any rendering pipeline."); + throw new InternalError("Error - unable to initialize any" + + " rendering pipeline."); } if (metalPipelineEnabled && MacOSFlags.isMetalVerbose()) { diff --git a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java index 8fa13515b86..86e90770857 100644 --- a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java +++ b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java @@ -55,7 +55,7 @@ static void setScratchSurface(MTLGraphicsConfig gc) { /** * Makes the given GraphicsConfig's context current to its associated * "scratch surface". Each GraphicsConfig maintains a native context - * (MTLDevice) as well as a native pbuffer + * (MTLDevice) as well as a native MTLTexture * known as the "scratch surface". By making the context current to the * scratch surface, we are assured that we have a current context for * the relevant GraphicsConfig, and can therefore perform operations diff --git a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLRenderer.java b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLRenderer.java index e90e313f703..5ca368d446e 100644 --- a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLRenderer.java +++ b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLRenderer.java @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package sun.java2d.metal; import sun.java2d.InvalidPipeException; diff --git a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java index 2418234eec1..9204bffda6a 100644 --- a/src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java +++ b/src/java.desktop/macosx/classes/sun/java2d/metal/MTLSurfaceData.java @@ -192,7 +192,9 @@ public static MTLLayerSurfaceData createData(MTLLayer layer) { * Creates a SurfaceData object representing an off-screen buffer */ public static MTLOffScreenSurfaceData createData(MTLGraphicsConfig gc, - int width, int height, ColorModel cm, Image image, int type) { + int width, int height, + ColorModel cm, Image image, + int type) { return new MTLOffScreenSurfaceData(gc, width, height, image, cm, type); } diff --git a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m index 85514696aeb..90fe41a1002 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m @@ -33,7 +33,6 @@ #include "MTLUtils.h" #include "GraphicsPrimitiveMgr.h" -#include // malloc #include // memcpy #include "IntArgbPre.h" diff --git a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m index 0b01653f3c9..a2f176d356e 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m @@ -51,7 +51,6 @@ * and WGL) source files. */ extern void MTLGC_DestroyMTLGraphicsConfig(jlong pConfigInfo); -extern void MTLSD_SwapBuffers(JNIEnv *env, jlong window); void MTLRenderQueue_CheckPreviousOp(jint op) { @@ -695,15 +694,6 @@ void MTLRenderQueue_CheckPreviousOp(jint op) { break; } - // multibuffering ops - case sun_java2d_pipe_BufferedOpCodes_SWAP_BUFFERS: - { - CHECK_PREVIOUS_OP(MTL_OP_OTHER); - jlong window = NEXT_LONG(b); - MTLSD_SwapBuffers(env, window); - break; - } - // special no-op (mainly used for achieving 8-byte alignment) case sun_java2d_pipe_BufferedOpCodes_NOOP: break; diff --git a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m index 3d356d0df5e..c7f8c7d4094 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m @@ -312,12 +312,6 @@ static jboolean MTLSurfaceData_initTexture(BMTLSDOps *bmtlsdo, jboolean isOpaque return JNI_TRUE; } -void -MTLSD_SwapBuffers(JNIEnv *env, jlong pPeerData) -{ - J2dTraceLn(J2D_TRACE_ERROR, "MTLSD_SwapBuffers -- :TODO"); -} - #pragma mark - #pragma mark "--- MTLSurfaceData methods ---"