Skip to content

Commit d9d00d3

Browse files
committed
8358107: Rollback JDK-8357299 changeset
Reviewed-by: psadhukhan
1 parent 5ad02c9 commit d9d00d3

File tree

2 files changed

+12
-69
lines changed

2 files changed

+12
-69
lines changed

src/java.desktop/share/native/libawt/java2d/loops/Blit.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -74,16 +74,19 @@ Java_sun_java2d_loops_Blit_Blit
7474

7575
srcInfo.bounds.x1 = srcx;
7676
srcInfo.bounds.y1 = srcy;
77-
srcInfo.bounds.x2 = UNSAFE_TO_ADD(srcx, width)
78-
? clipInfo.bounds.x2 : (srcx + width);
79-
srcInfo.bounds.y2 = UNSAFE_TO_ADD(srcy, height)
80-
? clipInfo.bounds.y2 : (srcy + height);
77+
if (UNSAFE_TO_ADD(srcx, width) ||
78+
UNSAFE_TO_ADD(srcy, height) ||
79+
UNSAFE_TO_ADD(dstx, width) ||
80+
UNSAFE_TO_ADD(dsty, height)) {
81+
return;
82+
}
83+
84+
srcInfo.bounds.x2 = srcx + width;
85+
srcInfo.bounds.y2 = srcy + height;
8186
dstInfo.bounds.x1 = dstx;
8287
dstInfo.bounds.y1 = dsty;
83-
dstInfo.bounds.x2 = UNSAFE_TO_ADD(dstx, width)
84-
? clipInfo.bounds.x2 : (dstx + width);
85-
dstInfo.bounds.y2 = UNSAFE_TO_ADD(dsty, height)
86-
? clipInfo.bounds.y2 : (dsty + height);
88+
dstInfo.bounds.x2 = dstx + width;
89+
dstInfo.bounds.y2 = dsty + height;
8790
if (UNSAFE_TO_SUB(srcx, dstx) ||
8891
UNSAFE_TO_SUB(srcy, dsty)) {
8992
return;

test/jdk/java/awt/Graphics/BrokenBoundsClip.java

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)