src/share/native/sun/java2d/pipe/BufferedMaskBlit.c

Print this page

        

*** 117,127 **** jint srcPixelStride = srcInfo.pixelStride; jint *pSrc = (jint *) PtrCoord(srcInfo.rasBase, srcInfo.bounds.x1, srcInfo.pixelStride, srcInfo.bounds.y1, srcInfo.scanStride); ! unsigned char *pMask = (*env)->GetPrimitiveArrayCritical(env, maskArray, 0); if (pMask == NULL) { J2dRlsTraceLn(J2D_TRACE_ERROR, "BufferedMaskBlit_enqueueTile: cannot lock mask array"); SurfaceData_InvokeRelease(env, srcOps, &srcInfo); --- 117,128 ---- jint srcPixelStride = srcInfo.pixelStride; jint *pSrc = (jint *) PtrCoord(srcInfo.rasBase, srcInfo.bounds.x1, srcInfo.pixelStride, srcInfo.bounds.y1, srcInfo.scanStride); ! unsigned char *pMask, *pMaskAlloc; ! pMask = pMaskAlloc = (*env)->GetPrimitiveArrayCritical(env, maskArray, 0); if (pMask == NULL) { J2dRlsTraceLn(J2D_TRACE_ERROR, "BufferedMaskBlit_enqueueTile: cannot lock mask array"); SurfaceData_InvokeRelease(env, srcOps, &srcInfo);
*** 272,282 **** // increment current byte position bpos += width * height * sizeof(jint); (*env)->ReleasePrimitiveArrayCritical(env, maskArray, ! pMask, JNI_ABORT); } SurfaceData_InvokeRelease(env, srcOps, &srcInfo); } SurfaceData_InvokeUnlock(env, srcOps, &srcInfo); --- 273,283 ---- // increment current byte position bpos += width * height * sizeof(jint); (*env)->ReleasePrimitiveArrayCritical(env, maskArray, ! pMaskAlloc, JNI_ABORT); } SurfaceData_InvokeRelease(env, srcOps, &srcInfo); } SurfaceData_InvokeUnlock(env, srcOps, &srcInfo);