Disable GDI batch code for regions. "Fixes" broken drawing for AcrobatReader. Yes, it's a "band aid over a bullet wound". I hope the man with the gun is a surgeon, too.

svn path=/trunk/; revision=47121
This commit is contained in:
Timo Kreuzer 2010-05-08 01:17:46 +00:00
parent 3f5ef48069
commit 4c417355a6

View file

@ -104,6 +104,7 @@ BOOL
FASTCALL FASTCALL
DeleteRegion( HRGN hRgn ) DeleteRegion( HRGN hRgn )
{ {
#if 0
PRGN_ATTR Rgn_Attr; PRGN_ATTR Rgn_Attr;
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) && if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
@ -118,6 +119,7 @@ DeleteRegion( HRGN hRgn )
return TRUE; return TRUE;
} }
} }
#endif
return NtGdiDeleteObjectApp((HGDIOBJ) hRgn); return NtGdiDeleteObjectApp((HGDIOBJ) hRgn);
} }
@ -199,6 +201,9 @@ CombineRgn(HRGN hDest,
INT Complexity; INT Complexity;
BOOL Ret; BOOL Ret;
// HACK
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
Ret = GdiGetHandleUserData((HGDIOBJ) hDest, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Dest); Ret = GdiGetHandleUserData((HGDIOBJ) hDest, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Dest);
Ret = GdiGetHandleUserData((HGDIOBJ) hSrc1, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Src1); Ret = GdiGetHandleUserData((HGDIOBJ) hSrc1, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Src1);
@ -436,6 +441,11 @@ CreateRectRgn(int x1, int y1, int x2, int y2)
HRGN hrgn; HRGN hrgn;
int tmp; int tmp;
/// <-
//// Remove when Brush/Pen/Rgn Attr is ready!
return NtGdiCreateRectRgn(x1,y1,x2,y2);
////
/* Normalize points */ /* Normalize points */
tmp = x1; tmp = x1;
if ( x1 > x2 ) if ( x1 > x2 )
@ -586,7 +596,7 @@ ExtSelectClipRgn( IN HDC hdc, IN HRGN hrgn, IN INT iMode)
{ {
if (pLDC->iType != LDC_EMFLDC || EMFDRV_ExtSelectClipRgn( hdc, )) if (pLDC->iType != LDC_EMFLDC || EMFDRV_ExtSelectClipRgn( hdc, ))
return NtGdiExtSelectClipRgn(hdc, ); return NtGdiExtSelectClipRgn(hdc, );
} }
else else
SetLastError(ERROR_INVALID_HANDLE); SetLastError(ERROR_INVALID_HANDLE);
return ERROR; return ERROR;
@ -734,7 +744,7 @@ GetRgnBox(HRGN hrgn,
{ {
PRGN_ATTR Rgn_Attr; PRGN_ATTR Rgn_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) //if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
return NtGdiGetRgnBox(hrgn, prcOut); return NtGdiGetRgnBox(hrgn, prcOut);
if (Rgn_Attr->Flags == NULLREGION) if (Rgn_Attr->Flags == NULLREGION)
@ -845,7 +855,8 @@ OffsetRgn( HRGN hrgn,
PRGN_ATTR pRgn_Attr; PRGN_ATTR pRgn_Attr;
int nLeftRect, nTopRect, nRightRect, nBottomRect; int nLeftRect, nTopRect, nRightRect, nBottomRect;
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr)) // HACKFIX
// if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset); return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
if ( pRgn_Attr->Flags == NULLREGION) if ( pRgn_Attr->Flags == NULLREGION)
@ -898,7 +909,8 @@ PtInRegion(IN HRGN hrgn,
{ {
PRGN_ATTR pRgn_Attr; PRGN_ATTR pRgn_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr)) // HACKFIX
//if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
return NtGdiPtInRegion(hrgn,x,y); return NtGdiPtInRegion(hrgn,x,y);
if ( pRgn_Attr->Flags == NULLREGION) if ( pRgn_Attr->Flags == NULLREGION)
@ -921,7 +933,8 @@ RectInRegion(HRGN hrgn,
PRGN_ATTR pRgn_Attr; PRGN_ATTR pRgn_Attr;
RECTL rc; RECTL rc;
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr)) // HACKFIX
//if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
return NtGdiRectInRegion(hrgn, (LPRECT) prcl); return NtGdiRectInRegion(hrgn, (LPRECT) prcl);
if ( pRgn_Attr->Flags == NULLREGION) if ( pRgn_Attr->Flags == NULLREGION)
@ -984,7 +997,7 @@ SetRectRgn(HRGN hrgn,
{ {
PRGN_ATTR Rgn_Attr; PRGN_ATTR Rgn_Attr;
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) //if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect); return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect)) if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect))