+{"files":[{"patch":"@@ -602,1 +602,1 @@\n-void copyFromMTLBuffer(void *pDst, id<MTLBuffer> srcBuf, jint offset, jint len, BOOL convertFromArgbPre) {\n+void copyFromMTLBuffer(void *pDst, id<MTLBuffer> srcBuf, NSUInteger offset, NSUInteger len, BOOL convertFromArgbPre) {\n@@ -605,2 +605,2 @@\n- jint pixelLen = len>>2;\n- for (int i = 0; i < pixelLen; i++) {\n+ NSUInteger pixelLen = len >> 2;\n+ for (NSUInteger i = 0; i < pixelLen; i++) {\n@@ -643,0 +643,4 @@\n+ RETURN_IF_TRUE(width < 0);\n+ RETURN_IF_TRUE(height < 0);\n+ NSUInteger w = (NSUInteger)width;\n+ NSUInteger h = (NSUInteger)height;\n@@ -678,1 +682,1 @@\n- pDst = PtrAddBytes(pDst, dstx * dstInfo.pixelStride);\n+ pDst = PtrPixelsRow(pDst, dstx, dstInfo.pixelStride);\n@@ -684,1 +688,1 @@\n- const int byteLength = width * height * 4; \/\/ NOTE: assume that src format is MTLPixelFormatBGRA8Unorm\n+ NSUInteger byteLength = w * h * 4; \/\/ NOTE: assume that src format is MTLPixelFormatBGRA8Unorm\n@@ -711,1 +715,1 @@\n- mtlbuf = [mtlc.device newBufferWithLength:width*height*4 options:MTLResourceStorageModeShared];\n+ mtlbuf = [mtlc.device newBufferWithLength:byteLength options:MTLResourceStorageModeShared];\n@@ -726,1 +730,1 @@\n- sourceSize:MTLSizeMake(width, height, 1)\n+ sourceSize:MTLSizeMake(w, h, 1)\n@@ -728,2 +732,2 @@\n- destinationOffset:0 \/*offset already taken in: pDst = PtrAddBytes(pDst, dstx * dstInfo.pixelStride)*\/\n- destinationBytesPerRow:width*4\n+ destinationOffset:0 \/*offset already taken in: pDst = PtrPixelsRow(pDst, dstx, dstInfo.pixelStride)*\/\n+ destinationBytesPerRow:w*4\n@@ -740,1 +744,1 @@\n- if ((dstInfo.scanStride == width * dstInfo.pixelStride) &&\n+ if ((dstInfo.scanStride == w * dstInfo.pixelStride) &&\n@@ -749,1 +753,1 @@\n- int rowSize = width * dstInfo.pixelStride;\n+ NSUInteger rowSize = w * dstInfo.pixelStride;\n","filename":"src\/java.desktop\/macosx\/native\/libawt_lwawt\/java2d\/metal\/MTLBlitLoops.m","additions":15,"deletions":11,"binary":false,"changes":26,"status":"modified"},{"patch":"@@ -178,1 +178,1 @@\n- bands[i] = PtrAddBytes(tableValues, i*bandLength*bytesPerElem);\n+ bands[i] = PtrPixelsBand(tableValues, i, bandLength, bytesPerElem);\n@@ -184,1 +184,1 @@\n- bands[i] = PtrAddBytes(tableValues, i*bandLength*bytesPerElem);\n+ bands[i] = PtrPixelsBand(tableValues, i, bandLength, bytesPerElem);\n","filename":"src\/java.desktop\/macosx\/native\/libawt_lwawt\/java2d\/metal\/MTLBufImgOps.m","additions":2,"deletions":2,"binary":false,"changes":4,"status":"modified"},{"patch":"@@ -488,0 +488,3 @@\n+#define PtrPixelsBand(p, y, length, elemSize) PtrAddBytes(p, \\\n+ ((intptr_t) (y)) * (length) * (elemSize))\n+\n","filename":"src\/java.desktop\/share\/native\/libawt\/java2d\/loops\/GraphicsPrimitiveMgr.h","additions":3,"deletions":0,"binary":false,"changes":3,"status":"modified"}]}
0 commit comments