Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit c76eeef

Browse files
author
Artem Bochkarev
committed
8243545: don't use clip rect in texture-mode (in IsoBlit)
1 parent 161711c commit c76eeef

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLBlitLoops.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141

4242
#import <Accelerate/Accelerate.h>
4343

44-
//#define TRACE_ISOBLIT
45-
//#define TRACE_BLIT
44+
#ifdef DEBUG
45+
#define TRACE_ISOBLIT
46+
#define TRACE_BLIT
47+
#endif //DEBUG
4648
//#define DEBUG_ISOBLIT
4749
//#define DEBUG_BLIT
4850

@@ -347,6 +349,8 @@ jboolean clipDestCoords(
347349
}
348350
if (*dx2 <= dcx1 || *dx1 >= dcx2 || *dy2 <= dcy1 || *dy1 >= dcy2) {
349351
J2dTraceLn(J2D_TRACE_INFO, "\tclipDestCoords: dest rect doesn't intersect clip area");
352+
J2dTraceLn4(J2D_TRACE_INFO, "\tdx2=%1.4f <= dcx1=%1.4f || *dx1=%1.4f >= dcx2=%1.4f", *dx2, dcx1, *dx1, dcx2);
353+
J2dTraceLn4(J2D_TRACE_INFO, "\t*dy2=%1.4f <= dcy1=%1.4f || *dy1=%1.4f >= dcy2=%1.4f", *dy2, dcy1, *dy1, dcy2);
350354
return JNI_FALSE;
351355
}
352356
if (*dx1 < dcx1) {
@@ -419,7 +423,7 @@ jboolean clipDestCoords(
419423
clipDestCoords(
420424
&dx1, &dy1, &dx2, &dy2,
421425
&sx1, &sy1, &sx2, &sy2,
422-
dstTex.width, dstTex.height, [mtlc.clip getRect]
426+
dstTex.width, dstTex.height, texture ? NULL : [mtlc.clip getRect]
423427
);
424428

425429
SurfaceDataBounds bounds;

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLContext.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ - (void)resetClip {
227227
}
228228

229229
- (void)setClipRectX1:(jint)x1 Y1:(jint)y1 X2:(jint)x2 Y2:(jint)y2 {
230+
J2dTraceLn4(J2D_TRACE_INFO, "MTLContext.setClipRect: %d,%d - %d,%d", x1, y1, x2, y2);
230231
[_clip setClipRectX1:x1 Y1:y1 X2:x2 Y2:y2];
231232
}
232233

0 commit comments

Comments
 (0)