Skip to content
Permalink
Browse files

8254879: Implement JNI path for Draw Poly

  • Loading branch information
jayathirthrao committed Oct 16, 2020
1 parent afc927b commit febb0275c4ff747c2616091527322a22ee5c5533
Showing with 23 additions and 2 deletions.
  1. +23 −2 src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLRenderer.m
@@ -287,8 +287,29 @@ void MTLRenderer_DrawPoly(MTLContext *mtlc, BMTLSDOps * dstOps,
jint transX, jint transY)
{
jint *xPoints, *yPoints;
//TODO
J2dTraceLn(J2D_TRACE_ERROR, "MTLRenderer_drawPoly -- :TODO");

J2dTraceLn(J2D_TRACE_INFO, "MTLRenderer_drawPoly");

xPoints = (jint *)
(*env)->GetPrimitiveArrayCritical(env, xpointsArray, NULL);
if (xPoints != NULL) {
yPoints = (jint *)
(*env)->GetPrimitiveArrayCritical(env, ypointsArray, NULL);
if (yPoints != NULL) {
MTLContext *mtlc = MTLRenderQueue_GetCurrentContext();
BMTLSDOps *dstOps = MTLRenderQueue_GetCurrentDestination();

MTLRenderer_DrawPoly(mtlc, dstOps,
nPoints, isClosed,
transX, transY,
xPoints, yPoints);

(*env)->ReleasePrimitiveArrayCritical(env, ypointsArray, yPoints,
JNI_ABORT);
}
(*env)->ReleasePrimitiveArrayCritical(env, xpointsArray, xPoints,
JNI_ABORT);
}
}

void

0 comments on commit febb027

Please sign in to comment.