src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m
branchmetal-prototype-branch
changeset 57458 3a7c29ba6b1c
parent 57416 e153174dba06
child 57472 5c986f86899e
equal deleted inserted replaced
57457:95604ec1205d 57458:3a7c29ba6b1c
   340     if (useBlitEncoder) {
   340     if (useBlitEncoder) {
   341 #ifdef DEBUG
   341 #ifdef DEBUG
   342         J2dTraceImpl(J2D_TRACE_VERBOSE, JNI_TRUE, "MTLBlitLoops_IsoBlit [via blitEncoder]: bdst=%p [tex=%p] %dx%d | src (%d, %d, %d, %d) -> dst (%1.2f, %1.2f, %1.2f, %1.2f)", dstOps, dstTex, dstTex.width, dstTex.height, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
   342         J2dTraceImpl(J2D_TRACE_VERBOSE, JNI_TRUE, "MTLBlitLoops_IsoBlit [via blitEncoder]: bdst=%p [tex=%p] %dx%d | src (%d, %d, %d, %d) -> dst (%1.2f, %1.2f, %1.2f, %1.2f)", dstOps, dstTex, dstTex.width, dstTex.height, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
   343 #endif //DEBUG
   343 #endif //DEBUG
   344         id <MTLBlitCommandEncoder> blitEncoder = [mtlc createBlitEncoder];
   344         id <MTLBlitCommandEncoder> blitEncoder = [mtlc createBlitEncoder];
   345         [blitEncoder copyFromTexture:srcTex sourceSlice:0 sourceLevel:0 sourceOrigin:MTLOriginMake(sx1, sy1, 0) sourceSize:MTLSizeMake(sx2 - sx1, sy2 - sy1, 1) toTexture:dstTex destinationSlice:0 destinationLevel:0 destinationOrigin:MTLOriginMake(dx1, dy1, 0)];
   345         [blitEncoder copyFromTexture:srcTex sourceSlice:0 sourceLevel:0 sourceOrigin:MTLOriginMake(sx1, sy1, 0) sourceSize:MTLSizeMake(mtlc.clipRect.width, mtlc.clipRect.height, 1) toTexture:dstTex destinationSlice:0 destinationLevel:0 destinationOrigin:MTLOriginMake(dx1, dy1, 0)];
   346         [blitEncoder endEncoding];
   346         [blitEncoder endEncoding];
   347     } else {
   347     } else {
   348         // TODO: support other flags
   348         // TODO: support other flags
   349         MTLBlitTextureToSurface(mtlc, srcOps, dstOps, rtt, hint, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
   349         MTLBlitTextureToSurface(mtlc, srcOps, dstOps, rtt, hint, sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2);
   350     }
   350     }