JDK-8227261: Add stubs that log a message for unimplemented methods metal-prototype-branch
authoraghaisas
Mon, 15 Jul 2019 15:23:54 +0530
branchmetal-prototype-branch
changeset 57472 5c986f86899e
parent 57471 db53417e25a6
child 57475 544abd4b9fd4
JDK-8227261: Add stubs that log a message for unimplemented methods
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBufImgOps.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLContext.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskBlit.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskFill.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLPaints.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m	Mon Jul 15 15:23:54 2019 +0530
@@ -107,7 +107,7 @@
                         jdouble dx1, jdouble dy1, jdouble dx2, jdouble dy2)
 {
     //TODO
-    //J2dTraceNotImplPrimitive("MTLBlitSurfaceToSurface");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBlitSurfaceToSurface -- :TODO");
 }
 
 static void drawTex2Tex(MTLContext *mtlc,
@@ -235,7 +235,7 @@
                            jdouble dx1, jdouble dy1, jdouble dx2, jdouble dy2)
 {
     //TODO
-    //J2dTraceNotImplPrimitive("MTLBlitToSurfaceViaTexture");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBlitToSurfaceViaTexture -- :TODO");
 }
 
 /**
@@ -257,7 +257,7 @@
                    jint dx1, jint dy1, jint dx2, jint dy2)
 {
     //TODO
-    //J2dTraceNotImplPrimitive("MTLBlitSwToTexture");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBlitSwToTexture -- :TODO");
 }
 
 /**
@@ -466,7 +466,7 @@
                              jint width, jint height)
 {
     //TODO
-    //J2dTraceNotImplPrimitive("MTLBlitLoops_SurfaceToSwBlit");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBlitLoops_SurfaceToSwBlit -- :TODO");
 }
 
 void
@@ -476,7 +476,7 @@
                       jint dx, jint dy)
 {
     //TODO
-    //J2dTraceNotImplPrimitive("MTLBlitLoops_CopyArea");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBlitLoops_CopyArea -- :TODO");
 }
 
 #endif /* !HEADLESS */
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBufImgOps.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBufImgOps.m	Mon Jul 15 15:23:54 2019 +0530
@@ -129,6 +129,8 @@
 MTLBufImgOps_CreateConvolveProgram(jint flags)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_CreateConvolveProgram -- :TODO");
+
     return NULL;
 }
 
@@ -139,13 +141,15 @@
                               unsigned char *kernel)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_EnableConvolveOp -- :TODO");
+
 }
 
 void
 MTLBufImgOps_DisableConvolveOp(MTLContext *mtlc)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableConvolveOp");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableConvolveOp -- :TODO");
 }
 
 /**************************** RescaleOp support *****************************/
@@ -218,6 +222,8 @@
 MTLBufImgOps_CreateRescaleProgram(jint flags)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_CreateRescaleProgram -- :TODO");
+
     return NULL;
 }
 
@@ -234,7 +240,7 @@
 MTLBufImgOps_DisableRescaleOp(MTLContext *mtlc)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableRescaleOp");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableRescaleOp -- :TODO");
     RETURN_IF_NULL(mtlc);
 }
 
@@ -346,7 +352,7 @@
 MTLBufImgOps_CreateLookupProgram(jint flags)
 {
     //TODO
-
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_CreateLookupProgram -- :TODO");
     return NULL;
 }
 
@@ -357,13 +363,14 @@
                             void *tableValues)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_EnableLookupOp -- :TODO");
 }
 
 void
 MTLBufImgOps_DisableLookupOp(MTLContext *mtlc)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableLookupOp");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLBufImgOps_DisableLookupOp -- :TODO");
 }
 
 #endif /* !HEADLESS */
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLContext.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLContext.m	Mon Jul 15 15:23:54 2019 +0530
@@ -224,17 +224,17 @@
 
 - (void)beginShapeClip {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLContext.beginShapeClip");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLContext.beginShapeClip -- :TODO");
 }
 
 - (void)endShapeClip {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLContext.endShapeClip");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLContext.endShapeClip  -- :TODO");
 }
 
 - (void)resetComposite {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLContext_ResetComposite");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLContext_ResetComposite  -- :TODO");
 }
 
 - (void)setAlphaCompositeRule:(jint)rule extraAlpha:(jfloat)_extraAlpha
@@ -249,7 +249,7 @@
 - (void)setXorComposite:(jint)xp {
     //TODO
     J2dTraceLn1(J2D_TRACE_INFO,
-                "MTLContext.setXorComposite: xorPixel=%08x", xp);
+                "MTLContext.setXorComposite: xorPixel=%08x -- :TODO", xp);
 }
 
 - (jboolean)isBlendingDisabled {
@@ -284,13 +284,15 @@
 
 - (jboolean)initBlitTileTexture {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLContext_InitBlitTileTexture");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLContext_InitBlitTileTexture -- :TODO");
 
     return JNI_TRUE;
 }
 
 - (jint)createBlitTextureFormat:(jint)internalFormat pixelFormat:(jint)pixelFormat
                           width:(jint)width height:(jint)height {
+    J2dTraceLn(J2D_TRACE_INFO, "MTLContext_InitBlitTileTexture -- :TODO");
+
     //TODO
     return 0;
 }
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskBlit.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskBlit.m	Mon Jul 15 15:23:54 2019 +0530
@@ -44,7 +44,7 @@
                      void *pPixels)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLMaskBlit_MaskBlit");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLMaskBlit_MaskBlit -- :TODO");
 
     if (width <= 0 || height <= 0) {
         J2dTraceLn(J2D_TRACE_WARNING,
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskFill.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLMaskFill.m	Mon Jul 15 15:23:54 2019 +0530
@@ -90,7 +90,7 @@
                      unsigned char *pMask)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLMaskFill_MaskFill");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLMaskFill_MaskFill -- :TODO");
 }
 
 JNIEXPORT void JNICALL
@@ -103,7 +103,7 @@
     MTLContext *mtlc = MTLRenderQueue_GetCurrentContext();
     unsigned char *mask;
     //TODO
-    J2dTraceLn(J2D_TRACE_ERROR, "MTLMaskFill_maskFill");
+    J2dTraceLn(J2D_TRACE_ERROR, "MTLMaskFill_maskFill -- :TODO");
 }
 
 #endif /* !HEADLESS */
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLPaints.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLPaints.m	Mon Jul 15 15:23:54 2019 +0530
@@ -40,7 +40,7 @@
 MTLPaints_ResetPaint(MTLContext *mtlc)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_ResetPaint");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_ResetPaint -- :TODO");
 }
 
 void
@@ -59,7 +59,7 @@
 MTLPaints_InitGradientTexture()
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_InitGradientTexture");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_InitGradientTexture -- :TODO");
 }
 
 
@@ -73,6 +73,7 @@
                           jdouble yp0, jdouble yp1, jdouble yp3)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_SetTexturePaint -- :TODO");
 }
 
 /****************** Shared MultipleGradientPaint support ********************/
@@ -283,7 +284,7 @@
 static void
 MTLPaints_InitMultiGradientTexture()
 {
-    //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_InitMultiGradientTexture -- :TODO");
 }
 
 /**
@@ -297,6 +298,8 @@
 {
 
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_CreateMultiGradProgram -- :TODO");
+
     return NULL;
 }
 
@@ -310,6 +313,7 @@
                                 void *pFractions, void *pPixels)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_SetMultiGradientPaint -- :TODO");
 
 }
 
@@ -369,6 +373,8 @@
                                  void *fractions, void *pixels)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_SetLinearGradientPaint -- :TODO");
+
 }
 
 /********************** RadialGradientPaint support *************************/
@@ -448,6 +454,8 @@
                                  void *fractions, void *pixels)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLPaints_SetRadialGradientPaint -- :TODO");
+
 }
 
 #endif /* !HEADLESS */
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderQueue.m	Mon Jul 15 15:23:54 2019 +0530
@@ -211,6 +211,7 @@
                 jint y = NEXT_INT(b);
                 CONTINUE_IF_NULL(mtlc);
                 //TODO
+                J2dTraceLn(J2D_TRACE_INFO, "MTLRenderQueue_DRAW_PIXEL -- :TODO");
             }
             break;
         case sun_java2d_pipe_BufferedOpCodes_DRAW_SCANLINES:
@@ -598,18 +599,25 @@
         case sun_java2d_pipe_BufferedOpCodes_SAVE_STATE:
             {
                 //TODO
+                J2dTraceLn(J2D_TRACE_INFO, "MTLRenderQueue_SAVE_STATE -- :TODO");
+
             }
             break;
 
         case sun_java2d_pipe_BufferedOpCodes_RESTORE_STATE:
             {
                 //TODO
+                J2dTraceLn(J2D_TRACE_INFO, "MTLRenderQueue_RESTORE_STATE -- :TODO");
 
             }
             break;
         case sun_java2d_pipe_BufferedOpCodes_SYNC:
             {
                 sync = JNI_TRUE;
+
+                // TODO
+                J2dTraceLn(J2D_TRACE_INFO, "MTLRenderQueue_SYNC -- :TODO");
+
             }
             break;
 
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m	Mon Jul 15 15:23:54 2019 +0530
@@ -199,7 +199,7 @@
 {
     jint *xPoints, *yPoints;
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_drawPoly");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_drawPoly -- :TODO");
 }
 
 void
@@ -207,7 +207,7 @@
                           jint scanlineCount, jint *scanlines)
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_DrawScanlines");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_DrawScanlines -- :TODO");
 }
 
 void
@@ -574,7 +574,7 @@
     jfloat u11, v11, u12, v12, u21, v21, u22, v22;
 
     J2dTraceLn6(J2D_TRACE_INFO,
-                "MTLRenderer_FillAAParallelogram "
+                "MTLRenderer_FillAAParallelogram -- :TODO"
                 "(x=%6.2f y=%6.2f "
                 "dx1=%6.2f dy1=%6.2f "
                 "dx2=%6.2f dy2=%6.2f)",
@@ -594,6 +594,7 @@
                                           jfloat ix12, jfloat iy12)
 {
     //TODO
+    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_FillAAParallelogramInnerOuter -- :TODO");
 }
 
 void
@@ -612,7 +613,7 @@
     jfloat ifx11, ify11, idx21, idy21, idx12, idy12;
 
     J2dTraceLn8(J2D_TRACE_INFO,
-                "MTLRenderer_DrawAAParallelogram "
+                "MTLRenderer_DrawAAParallelogram -- :TODO"
                 "(x=%6.2f y=%6.2f "
                 "dx1=%6.2f dy1=%6.2f lwr1=%6.2f "
                 "dx2=%6.2f dy2=%6.2f lwr2=%6.2f)",
@@ -626,14 +627,14 @@
 MTLRenderer_EnableAAParallelogramProgram()
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_EnableAAParallelogramProgram");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_EnableAAParallelogramProgram -- :TODO");
 }
 
 void
 MTLRenderer_DisableAAParallelogramProgram()
 {
     //TODO
-    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_DisableAAParallelogramProgram");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_DisableAAParallelogramProgram -- :TODO");
 }
 
 #endif /* !HEADLESS */
--- a/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m	Mon Jul 15 14:31:28 2019 +0530
+++ b/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLSurfaceData.m	Mon Jul 15 15:23:54 2019 +0530
@@ -204,7 +204,7 @@
     //TODO
     MTLSDOps *mtlsdo = (MTLSDOps *)jlong_to_ptr(pData);
 
-    J2dTraceLn(J2D_TRACE_INFO, "MTLSurfaceData_initFlipBackbuffer");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLSurfaceData_initFlipBackbuffer -- :TODO");
     return JNI_TRUE;
 }
 
@@ -216,7 +216,7 @@
     //TODO
     MTLSDOps *mtlsdo = (MTLSDOps *)jlong_to_ptr(pData);
 
-    J2dTraceLn(J2D_TRACE_INFO, "MTLSurfaceData_getTextureTarget");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLSurfaceData_getTextureTarget -- :TODO");
 
     return 0;
 }
@@ -338,7 +338,7 @@
 jlong
 MTLSD_GetNativeConfigInfo(BMTLSDOps *mtlsdo)
 {
-    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_GetNativeConfigInfo");
+    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_GetNativeConfigInfo -- :TODO");
 
     return 0;
 }
@@ -351,7 +351,7 @@
 jboolean
 MTLSD_InitMTLWindow(JNIEnv *env, MTLSDOps *oglsdo)
 {
-    J2dTraceLn(J2D_TRACE_INFO, "MTLSD_InitMTLWindow");
+    J2dTraceLn(J2D_TRACE_INFO, "MTLSD_InitMTLWindow -- :TODO");
 
     return JNI_TRUE;
 }
@@ -359,7 +359,7 @@
 void
 MTLSD_SwapBuffers(JNIEnv *env, jlong pPeerData)
 {
-    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SwapBuffers");
+    J2dTraceLn(J2D_TRACE_INFO, "OGLSD_SwapBuffers -- :TODO");
 }
 
 #pragma mark -