Author: tfaber
Date: Sat May 6 12:18:21 2017
New Revision: 74486
URL:
http://svn.reactos.org/svn/reactos?rev=74486&view=rev
Log:
[WIN32K:NTGDI]
- Avoid using floating point operations in kernel mode.
CORE-10893
Modified:
trunk/reactos/win32ss/gdi/ntgdi/brush.h
trunk/reactos/win32ss/gdi/ntgdi/pen.c
trunk/reactos/win32ss/gdi/ntgdi/stockobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/brush.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/brush.h?…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/brush.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/brush.h [iso-8859-1] Sat May 6 12:18:21 2017
@@ -33,7 +33,7 @@
/* The following members are for PENs only */
LONG lWidth;
- FLOAT eWidth;
+ FLOATOBJ eWidth;
ULONG ulPenStyle;
DWORD *pStyle;
ULONG dwStyleCount;
Modified: trunk/reactos/win32ss/gdi/ntgdi/pen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/pen.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/pen.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/pen.c [iso-8859-1] Sat May 6 12:18:21 2017
@@ -122,7 +122,7 @@
dwWidth = 1;
pbrushPen->lWidth = dwWidth;
- pbrushPen->eWidth = (FLOAT)pbrushPen->lWidth;
+ FLOATOBJ_SetLong(&pbrushPen->eWidth, pbrushPen->lWidth);
pbrushPen->ulPenStyle = dwPenStyle;
pbrushPen->BrushAttr.lbColor = ulColor;
pbrushPen->iBrushStyle = ulBrushStyle;
Modified: trunk/reactos/win32ss/gdi/ntgdi/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/stockobj…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/stockobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/stockobj.c [iso-8859-1] Sat May 6 12:18:21 2017
@@ -116,7 +116,7 @@
pbrushPen->iHatch = 0;
pbrushPen->lWidth = abs(dwWidth);
- pbrushPen->eWidth = (FLOAT)pbrushPen->lWidth;
+ FLOATOBJ_SetLong(&pbrushPen->eWidth, pbrushPen->lWidth);
pbrushPen->ulPenStyle = dwPenStyle;
pbrushPen->BrushAttr.lbColor = ulColor;
pbrushPen->iBrushStyle = ulBrushStyle;