Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
8254879: Implement JNI path for Draw Poly
- Loading branch information
|
@@ -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 |
|
|