Convert ROP2 to MIX when calling driver Modified: trunk/reactos/subsys/win32k/eng/lineto.c Modified: trunk/reactos/subsys/win32k/include/inteng.h Modified: trunk/reactos/subsys/win32k/objects/dc.c Modified: trunk/reactos/subsys/win32k/objects/fillshap.c Modified: trunk/reactos/subsys/win32k/objects/line.c _____
Modified: trunk/reactos/subsys/win32k/eng/lineto.c --- trunk/reactos/subsys/win32k/eng/lineto.c 2005-02-05 10:17:33 UTC (rev 13419) +++ trunk/reactos/subsys/win32k/eng/lineto.c 2005-02-05 10:19:49 UTC (rev 13420) @@ -488,7 +488,7 @@
LONG x2, LONG y2, RECTL *RectBounds, - MIX mix) + MIX Mix) { BOOLEAN ret; SURFOBJ *DestSurf; @@ -524,7 +524,7 @@ { /* Call the driver's DrvLineTo */ ret = GDIDEVFUNCS(DestSurf).LineTo( - DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, mix); + DestSurf, Clip, Brush, x1, y1, x2, y2, /*RectBounds*/&b, Mix); }
#if 0 @@ -536,7 +536,7 @@
if (! ret) { - ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, mix); + ret = EngLineTo(DestSurf, Clip, Brush, x1, y1, x2, y2, RectBounds, Mix); }
MouseSafetyOnDrawEnd(DestSurf); @@ -550,7 +550,7 @@ BRUSHOBJ *Brush, CONST LPPOINT pt, LONG dCount, - MIX mix) + MIX Mix) { LONG i; RECTL rect; @@ -571,7 +571,7 @@ pt[i].x, pt[i].y, &rect, - mix); + Mix); if (!ret) { break; _____
Modified: trunk/reactos/subsys/win32k/include/inteng.h --- trunk/reactos/subsys/win32k/include/inteng.h 2005-02-05 10:17:33 UTC (rev 13419) +++ trunk/reactos/subsys/win32k/include/inteng.h 2005-02-05 10:19:49 UTC (rev 13420) @@ -32,7 +32,7 @@
IntEngCleanupDriverObjs(struct _EPROCESS *Process, PW32PROCESS Win32Process);
- +#define ROP2_TO_MIX(Rop2) (((Rop2) << 8) | (Rop2)) BOOL STDCALL IntEngLineTo(BITMAPOBJ *Surface, CLIPOBJ *Clip, _____
Modified: trunk/reactos/subsys/win32k/objects/dc.c --- trunk/reactos/subsys/win32k/objects/dc.c 2005-02-05 10:17:33 UTC (rev 13419) +++ trunk/reactos/subsys/win32k/objects/dc.c 2005-02-05 10:19:49 UTC (rev 13420) @@ -212,6 +212,7 @@
NewDC->w.textAlign = OrigDC->w.textAlign; NewDC->w.backgroundColor = OrigDC->w.backgroundColor; NewDC->w.backgroundMode = OrigDC->w.backgroundMode; + NewDC->w.ROPmode = OrigDC->w.ROPmode; DC_UnlockDc( hDC ); if (NULL != DisplayDC) { @@ -774,8 +775,8 @@ NewDC->DMW.dmDisplayFrequency = 0;
NewDC->w.bitsPerPixel = NewDC->DMW.dmBitsPerPel; // FIXME: set this here?? - NewDC->w.hPalette = NewDC->DevInfo->hpalDefault; + NewDC->w.ROPmode = R2_COPYPEN;
DPRINT("Bits per pel: %u\n", NewDC->w.bitsPerPixel);
_____
Modified: trunk/reactos/subsys/win32k/objects/fillshap.c --- trunk/reactos/subsys/win32k/objects/fillshap.c 2005-02-05 10:17:33 UTC (rev 13419) +++ trunk/reactos/subsys/win32k/objects/fillshap.c 2005-02-05 10:19:49 UTC (rev 13420) @@ -28,7 +28,7 @@
&BrushInst.BrushObject, \ x, y, (x)+1, y, \ &RectBounds, \ - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode));
#define PUTLINE(x1,y1,x2,y2,BrushInst) \ ret = ret && IntEngLineTo(BitmapObj, \ @@ -36,7 +36,7 @@ &BrushInst.BrushObject, \ x1, y1, x2, y2, \ &RectBounds, \ - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode));
BOOL FASTCALL IntGdiPolygon(PDC dc, @@ -93,7 +93,7 @@ if (!(FillBrushObj->flAttrs & GDIBRUSH_IS_NULL)) { IntGdiInitBrushInstance(&FillBrushInst, FillBrushObj, dc->XlateBrush); - ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, dc->w.ROPmode, UnsafePoints, Count, DestRect ); + ret = FillPolygon ( dc, BitmapObj, &FillBrushInst.BrushObject, ROP2_TO_MIX(dc->w.ROPmode), UnsafePoints, Count, DestRect ); } BRUSHOBJ_UnlockBrush(dc->w.hBrush);
@@ -128,7 +128,7 @@ To.x, To.y, &DestRect, - dc->w.ROPmode); /* MIX */ + ROP2_TO_MIX(dc->w.ROPmode)); /* MIX */ } } PENOBJ_UnlockPen( dc->w.hPen ); @@ -939,6 +939,7 @@ GDIBRUSHINST PenBrushInst, FillBrushInst; BOOL ret = FALSE; // default to failure RECTL DestRect; + MIX Mix;
ASSERT ( dc ); // caller's responsibility to set this up /* FIXME - BitmapObj can be NULL!!! Don't assert but handle this case gracefully! */ @@ -1001,33 +1002,34 @@
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL)) { + Mix = ROP2_TO_MIX(dc->w.ROPmode); ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, LeftRect, TopRect, RightRect, TopRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix);
ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, RightRect, TopRect, RightRect, BottomRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix);
ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, RightRect, BottomRect, LeftRect, BottomRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX + Mix);
ret = ret && IntEngLineTo(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, LeftRect, BottomRect, LeftRect, TopRect, &DestRect, // Bounding rectangle - dc->w.ROPmode); // MIX */ + Mix); }
PENOBJ_UnlockPen(dc->w.hPen); _____
Modified: trunk/reactos/subsys/win32k/objects/line.c --- trunk/reactos/subsys/win32k/objects/line.c 2005-02-05 10:17:33 UTC (rev 13419) +++ trunk/reactos/subsys/win32k/objects/line.c 2005-02-05 10:19:49 UTC (rev 13420) @@ -110,7 +110,7 @@
Points[0].x, Points[0].y, Points[1].x, Points[1].y, &Bounds, - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode)); }
BITMAPOBJ_UnlockBitmap ( dc->w.hBitmap ); @@ -228,7 +228,7 @@ IntGdiInitBrushInstance(&PenBrushInst, PenBrushObj, dc->XlatePen); Ret = IntEngPolyline(BitmapObj, dc->CombinedClip, &PenBrushInst.BrushObject, Points, Count, - dc->w.ROPmode); + ROP2_TO_MIX(dc->w.ROPmode));
BITMAPOBJ_UnlockBitmap(dc->w.hBitmap); EngFreeMem(Points);