Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit

Permalink
8254879: Implement JNI path for Draw Poly
Browse files Browse the repository at this point in the history
  • Loading branch information
jayathirthrao committed Oct 16, 2020
1 parent afc927b commit 560c586
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 560c586

Please sign in to comment.