mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[WIN32K]
- Add missing DC_vPrepareDCsForBlit / DC_vFinishBlit - Save and restore floating point state in some functions svn path=/trunk/; revision=60786
This commit is contained in:
parent
7cfd0230d5
commit
39b0f9dba1
|
@ -316,6 +316,7 @@ NtGdiAngleArc(
|
|||
DC *pDC;
|
||||
BOOL Ret = FALSE;
|
||||
gxf_long worker, worker1;
|
||||
KFLOATING_SAVE FloatSave;
|
||||
|
||||
pDC = DC_LockDc (hDC);
|
||||
if(!pDC)
|
||||
|
@ -329,6 +330,9 @@ NtGdiAngleArc(
|
|||
/* 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 @@ NtGdiAngleArc(
|
|||
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 @@ NtGdiArcInternal(
|
|||
{
|
||||
DC *dc;
|
||||
BOOL Ret;
|
||||
KFLOATING_SAVE FloatSave;
|
||||
|
||||
dc = DC_LockDc (hDC);
|
||||
if(!dc)
|
||||
|
@ -382,6 +390,8 @@ NtGdiArcInternal(
|
|||
if (dc->pdcattr->ulDirty_ & (DIRTY_LINE | DC_PEN_DIRTY))
|
||||
DC_vUpdateLineBrush(dc);
|
||||
|
||||
KeSaveFloatingPointState(&FloatSave);
|
||||
|
||||
Ret = IntGdiArcInternal(
|
||||
arctype,
|
||||
dc,
|
||||
|
@ -394,6 +404,7 @@ NtGdiArcInternal(
|
|||
XEndArc,
|
||||
YEndArc);
|
||||
|
||||
KeRestoreFloatingPointState(&FloatSave);
|
||||
DC_vFinishBlit(dc, NULL);
|
||||
DC_UnlockDc( dc );
|
||||
return Ret;
|
||||
|
|
|
@ -306,6 +306,9 @@ NtGdiEllipse(
|
|||
//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 @@ NtGdiEllipse(
|
|||
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 @@ IntRoundRect(
|
|||
}
|
||||
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 @@ IntRoundRect(
|
|||
yCurveDiameter,
|
||||
&brushTemp);
|
||||
BRUSH_ShareUnlockBrush(pbrFill);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
ret = IntDrawRoundRect( dc,
|
||||
RectBounds.left,
|
||||
RectBounds.top,
|
||||
RectBounds.right,
|
||||
RectBounds.bottom,
|
||||
xCurveDiameter,
|
||||
yCurveDiameter,
|
||||
pbrLine);
|
||||
}
|
||||
|
||||
DC_vFinishBlit(dc, NULL);
|
||||
}
|
||||
|
||||
if (ret)
|
||||
ret = IntDrawRoundRect( dc,
|
||||
RectBounds.left,
|
||||
RectBounds.top,
|
||||
RectBounds.right,
|
||||
RectBounds.bottom,
|
||||
xCurveDiameter,
|
||||
yCurveDiameter,
|
||||
pbrLine);
|
||||
|
||||
pbrLine->ptPenWidth.x = PenOrigWidth;
|
||||
PEN_ShareUnlockPen(pbrLine);
|
||||
|
@ -1094,6 +1109,8 @@ NtGdiExtFloodFill(
|
|||
else
|
||||
goto cleanup;
|
||||
|
||||
DC_vPrepareDCsForBlit(dc, DestRect, NULL, DestRect);
|
||||
|
||||
psurf = dc->dclevel.pSurface;
|
||||
if (!psurf)
|
||||
{
|
||||
|
@ -1113,6 +1130,7 @@ NtGdiExtFloodFill(
|
|||
EXLATEOBJ_vCleanup(&exlo);
|
||||
|
||||
cleanup:
|
||||
DC_vFinishBlit(dc, NULL);
|
||||
DC_UnlockDc(dc);
|
||||
return Ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue