[1/6] gdiplus: Use same rounding formula that is used to decide whether a path should be stored as an array integers.

Dmitry Timoshkov dmitry at baikal.ru
Fri Nov 8 01:33:26 CST 2013


... and avoid a needless memcpy.
---
 dlls/gdiplus/region.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index 7186518..3e718ef 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -739,11 +739,9 @@ static inline void write_float(DWORD* location, INT* offset, const FLOAT write)
 static inline void write_packed_point(DWORD* location, INT* offset,
         const GpPointF* write)
 {
-    packed_point point;
-
-    point.X = write->X;
-    point.Y = write->Y;
-    memcpy(location + *offset, &point, sizeof(packed_point));
+    packed_point *point = (packed_point *)(location + *offset);
+    point->X = gdip_round(write->X);
+    point->Y = gdip_round(write->Y);
     (*offset)++;
 }
 
-- 
1.8.4.1




More information about the wine-patches mailing list