This repository was archived by the owner on Aug 27, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/java.desktop/macosx/native/libawt_lwawt/java2d/metal Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ void drawTex2Tex(MTLContext *mtlc,
172172 dw, dh, dx1, dy1);
173173 // NOTE: we might want to fill alpha channel when !rfi->hasAlpha
174174
175- id <MTLBuffer > buff = [mtlc.device newBufferWithLength: (sw * sh * srcInfo->pixelStride) options: MTLResourceStorageModeManaged ];
175+ id <MTLBuffer > buff = [[ mtlc.device newBufferWithLength: (sw * sh * srcInfo->pixelStride) options: MTLResourceStorageModeManaged ] autorelease ];
176176
177177 // copy src pixels inside src bounds to buff
178178 for (int row = 0 ; row < sh; row++) {
@@ -182,7 +182,7 @@ void drawTex2Tex(MTLContext *mtlc,
182182 [buff didModifyRange: NSMakeRange (0 , buff.length)];
183183
184184 if (rfi->swizzleKernel != nil ) {
185- id <MTLBuffer > swizzled = [mtlc.device newBufferWithLength: (sw * sh * srcInfo->pixelStride) options: MTLResourceStorageModeManaged ];
185+ id <MTLBuffer > swizzled = [[ mtlc.device newBufferWithLength: (sw * sh * srcInfo->pixelStride) options: MTLResourceStorageModeManaged ] autorelease ];
186186
187187 // this should be cheap, since data is already on GPU
188188 id <MTLCommandBuffer > cb = [mtlc createCommandBuffer ];
You can’t perform that action at this time.
0 commit comments