Author: tkreuzer
Date: Mon Oct 28 20:26:08 2013
New Revision: 60786
URL:
http://svn.reactos.org/svn/reactos?rev=60786&view=rev
Log:
[WIN32K]
- Add missing DC_vPrepareDCsForBlit / DC_vFinishBlit
- Save and restore floating point state in some functions
Modified:
trunk/reactos/win32ss/gdi/ntgdi/arc.c
trunk/reactos/win32ss/gdi/ntgdi/fillshap.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/arc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/arc.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/arc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/arc.c [iso-8859-1] Mon Oct 28 20:26:08 2013
@@ -316,6 +316,7 @@
DC *pDC;
BOOL Ret = FALSE;
gxf_long worker, worker1;
+ KFLOATING_SAVE FloatSave;
pDC = DC_LockDc (hDC);
if(!pDC)
@@ -329,6 +330,9 @@
/* Yes, Windows really returns TRUE in this case */
return TRUE;
}
+
+ KeSaveFloatingPointState(&FloatSave);
+
worker.l = dwStartAngle;
worker1.l = dwSweepAngle;
DC_vPrepareDCsForBlit(pDC, pDC->rosdc.CombinedClip->rclBounds,
@@ -340,6 +344,9 @@
Ret = IntGdiAngleArc( pDC, x, y, dwRadius, worker.f, worker1.f);
DC_vFinishBlit(pDC, NULL);
DC_UnlockDc( pDC );
+
+ KeRestoreFloatingPointState(&FloatSave);
+
return Ret;
}
@@ -359,6 +366,7 @@
{
DC *dc;
BOOL Ret;
+ KFLOATING_SAVE FloatSave;
dc = DC_LockDc (hDC);
if(!dc)
@@ -381,6 +389,8 @@
if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
DC_vUpdateLineBrush(dc);
+
+ KeSaveFloatingPointState(&FloatSave);
Ret = IntGdiArcInternal(
arctype,
@@ -394,6 +404,7 @@
XEndArc,
YEndArc);
+ KeRestoreFloatingPointState(&FloatSave);
DC_vFinishBlit(dc, NULL);
DC_UnlockDc( dc );
return Ret;
Modified: trunk/reactos/win32ss/gdi/ntgdi/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/fillshap…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/fillshap.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/fillshap.c [iso-8859-1] Mon Oct 28 20:26:08 2013
@@ -306,6 +306,9 @@
//tmpFillBrushObj.ptOrigin.y += RectBounds.top - Top;
tmpFillBrushObj.ptOrigin.x += dc->ptlDCOrig.x;
tmpFillBrushObj.ptOrigin.y += dc->ptlDCOrig.y;
+
+ DC_vPrepareDCsForBlit(dc, RectBounds, NULL, RectBounds);
+
ret = IntFillEllipse( dc,
CenterX - RadiusX,
CenterY - RadiusY,
@@ -313,15 +316,19 @@
RadiusY*2, // Height
&tmpFillBrushObj);
BRUSH_ShareUnlockBrush(pFillBrushObj);
- }
-
- if (ret)
- ret = IntDrawEllipse( dc,
- CenterX - RadiusX,
- CenterY - RadiusY,
- RadiusX*2, // Width
- RadiusY*2, // Height
- pbrush);
+
+ if (ret)
+ {
+ ret = IntDrawEllipse( dc,
+ CenterX - RadiusX,
+ CenterY - RadiusY,
+ RadiusX*2, // Width
+ RadiusY*2, // Height
+ pbrush);
+ }
+
+ DC_vFinishBlit(dc, NULL);
+ }
pbrush->ptPenWidth.x = PenOrigWidth;
PEN_ShareUnlockPen(pbrush);
@@ -788,6 +795,9 @@
}
else
{
+
+ DC_vPrepareDCsForBlit(dc, RectBounds, NULL, RectBounds);
+
RtlCopyMemory(&brushTemp, pbrFill, sizeof(brushTemp));
brushTemp.ptOrigin.x += RectBounds.left - Left;
brushTemp.ptOrigin.y += RectBounds.top - Top;
@@ -800,17 +810,22 @@
yCurveDiameter,
&brushTemp);
BRUSH_ShareUnlockBrush(pbrFill);
- }
-
- if (ret)
- ret = IntDrawRoundRect( dc,
- RectBounds.left,
- RectBounds.top,
- RectBounds.right,
- RectBounds.bottom,
- xCurveDiameter,
- yCurveDiameter,
- pbrLine);
+
+ if (ret)
+ {
+ ret = IntDrawRoundRect( dc,
+ RectBounds.left,
+ RectBounds.top,
+ RectBounds.right,
+ RectBounds.bottom,
+ xCurveDiameter,
+ yCurveDiameter,
+ pbrLine);
+ }
+
+ DC_vFinishBlit(dc, NULL);
+ }
+
pbrLine->ptPenWidth.x = PenOrigWidth;
PEN_ShareUnlockPen(pbrLine);
@@ -1094,6 +1109,8 @@
else
goto cleanup;
+ DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
+
psurf = dc->dclevel.pSurface;
if (!psurf)
{
@@ -1113,6 +1130,7 @@
EXLATEOBJ_vCleanup(&exlo);
cleanup:
+ DC_vFinishBlit(dc, NULL);
DC_UnlockDc(dc);
return Ret;
}