[ros-diffs] [tkreuzer] 47121: 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.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat May 8 03:17:47 CEST 2010


Author: tkreuzer
Date: Sat May  8 03:17:46 2010
New Revision: 47121

URL: http://svn.reactos.org/svn/reactos?rev=47121&view=rev
Log:
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.

Modified:
    trunk/reactos/dll/win32/gdi32/objects/region.c

Modified: trunk/reactos/dll/win32/gdi32/objects/region.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/region.c?rev=47121&r1=47120&r2=47121&view=diff
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/gdi32/objects/region.c [iso-8859-1] Sat May  8 03:17:46 2010
@@ -104,6 +104,7 @@
 FASTCALL
 DeleteRegion( HRGN hRgn )
 {
+#if 0
   PRGN_ATTR Rgn_Attr;
 
   if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
@@ -118,6 +119,7 @@
           return TRUE;
       }
   }
+#endif
   return NtGdiDeleteObjectApp((HGDIOBJ) hRgn);
 }
 
@@ -199,6 +201,9 @@
   INT Complexity;
   BOOL Ret;
 
+// HACK
+return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
+
   Ret = GdiGetHandleUserData((HGDIOBJ) hDest, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Dest);
   Ret = GdiGetHandleUserData((HGDIOBJ) hSrc1, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr_Src1);
 
@@ -436,6 +441,11 @@
   HRGN hrgn;
   int tmp;
 
+/// <-
+//// Remove when Brush/Pen/Rgn Attr is ready!
+  return NtGdiCreateRectRgn(x1,y1,x2,y2);
+////
+
  /* Normalize points */
   tmp = x1;
   if ( x1 > x2 )
@@ -586,7 +596,7 @@
       {
          if (pLDC->iType != LDC_EMFLDC || EMFDRV_ExtSelectClipRgn( hdc, ))
              return NtGdiExtSelectClipRgn(hdc, );
-      }
+}
       else
         SetLastError(ERROR_INVALID_HANDLE);
       return ERROR;
@@ -734,7 +744,7 @@
 {
   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);
 
   if (Rgn_Attr->Flags == NULLREGION)
@@ -845,7 +855,8 @@
   PRGN_ATTR pRgn_Attr;
   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);
 
   if ( pRgn_Attr->Flags == NULLREGION)
@@ -898,7 +909,8 @@
 {
   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);
 
   if ( pRgn_Attr->Flags == NULLREGION)
@@ -921,7 +933,8 @@
   PRGN_ATTR pRgn_Attr;
   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);
 
   if ( pRgn_Attr->Flags == NULLREGION)
@@ -984,7 +997,7 @@
 {
   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);
 
   if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect))




More information about the Ros-diffs mailing list