src/solaris/native/sun/java2d/x11/X11SurfaceData.c

Print this page
rev 8822 : 8024854: PPC64: Basic changes and files to build the class library on AIX
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan, art
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com

*** 54,65 **** jint lockFlags; XImage *img; int x, y; } X11RIPrivate; ! #define MAX(a,b) ((a) > (b) ? (a) : (b)) ! #define MIN(a,b) ((a) < (b) ? (a) : (b)) static LockFunc X11SD_Lock; static GetRasInfoFunc X11SD_GetRasInfo; static UnlockFunc X11SD_Unlock; static DisposeFunc X11SD_Dispose; --- 54,65 ---- jint lockFlags; XImage *img; int x, y; } X11RIPrivate; ! #define XSD_MAX(a,b) ((a) > (b) ? (a) : (b)) ! #define XSD_MIN(a,b) ((a) < (b) ? (a) : (b)) static LockFunc X11SD_Lock; static GetRasInfoFunc X11SD_GetRasInfo; static UnlockFunc X11SD_Unlock; static DisposeFunc X11SD_Dispose;
*** 1088,1101 **** y1 = -(y1 + tmpy); x2 = x1 + DisplayWidth(awt_display, xsdo->configData->awt_visInfo.screen); y2 = y1 + DisplayHeight(awt_display, xsdo->configData->awt_visInfo.screen); ! x1 = MAX(bounds->x1, x1); ! y1 = MAX(bounds->y1, y1); ! x2 = MIN(bounds->x2, x2); ! y2 = MIN(bounds->y2, y2); if ((x1 >= x2) || (y1 >= y2)) { return FALSE; } b->x1 = x1; b->y1 = y1; --- 1088,1101 ---- y1 = -(y1 + tmpy); x2 = x1 + DisplayWidth(awt_display, xsdo->configData->awt_visInfo.screen); y2 = y1 + DisplayHeight(awt_display, xsdo->configData->awt_visInfo.screen); ! x1 = XSD_MAX(bounds->x1, x1); ! y1 = XSD_MAX(bounds->y1, y1); ! x2 = XSD_MIN(bounds->x2, x2); ! y2 = XSD_MIN(bounds->y2, y2); if ((x1 >= x2) || (y1 >= y2)) { return FALSE; } b->x1 = x1; b->y1 = y1;