Module: wine Branch: master Commit: fa184bc2c2ff2b597c797c69bdea1980355df5f6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fa184bc2c2ff2b597c797c69bd...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Tue Nov 6 17:39:18 2012 +0800
gdiplus: Allocate a copy of the graphics transformation matrix on the stack instead of cloning it.
---
dlls/gdiplus/graphics.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index e7b72b7..f364a64 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -312,7 +312,7 @@ static void transform_and_round_points(GpGraphics *graphics, POINT *pti, GpPointF *ptf, INT count) { REAL scale_x, scale_y; - GpMatrix *matrix; + GpMatrix matrix; int i;
scale_x = units_to_pixels(1.0, graphics->unit, graphics->xres); @@ -325,10 +325,9 @@ static void transform_and_round_points(GpGraphics *graphics, POINT *pti, scale_y *= graphics->scale; }
- GdipCloneMatrix(graphics->worldtrans, &matrix); - GdipScaleMatrix(matrix, scale_x, scale_y, MatrixOrderAppend); - GdipTransformMatrixPoints(matrix, ptf, count); - GdipDeleteMatrix(matrix); + matrix = *graphics->worldtrans; + GdipScaleMatrix(&matrix, scale_x, scale_y, MatrixOrderAppend); + GdipTransformMatrixPoints(&matrix, ptf, count);
for(i = 0; i < count; i++){ pti[i].x = gdip_round(ptf[i].X);