mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 12:13:01 +00:00
- Fix WidenPath. Now Area.exe runs and crashes when using real hardware. That is a good thing. We now know our Xorg based region code has problems. It allocates all the memory building PolyPolygon region data.
svn path=/trunk/; revision=37223
This commit is contained in:
parent
7438df3dcd
commit
c15d69d936
1 changed files with 7 additions and 3 deletions
|
@ -1490,9 +1490,9 @@ BOOL
|
|||
FASTCALL
|
||||
PATH_WidenPath(DC *dc)
|
||||
{
|
||||
INT i, j, numStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle;
|
||||
INT i, j, numStrokes, numOldStrokes, penWidth, penWidthIn, penWidthOut, size, penStyle;
|
||||
BOOL ret = FALSE;
|
||||
PPATH pPath, pNewPath, *pStrokes, pUpPath, pDownPath;
|
||||
PPATH pPath, pNewPath, *pStrokes, *pOldStrokes, pUpPath, pDownPath;
|
||||
EXTLOGPEN *elp;
|
||||
DWORD obj_type, joint, endcap, penType;
|
||||
PDC_ATTR Dc_Attr = dc->pDc_Attr;
|
||||
|
@ -1560,6 +1560,7 @@ PATH_WidenPath(DC *dc)
|
|||
penWidthOut++;
|
||||
|
||||
numStrokes = 0;
|
||||
numOldStrokes = 1;
|
||||
|
||||
pStrokes = ExAllocatePoolWithTag(PagedPool, sizeof(PPATH), TAG_PATH);
|
||||
pStrokes[0] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
|
||||
|
@ -1588,8 +1589,11 @@ PATH_WidenPath(DC *dc)
|
|||
}
|
||||
numStrokes++;
|
||||
j = 0;
|
||||
ExFreePoolWithTag(pStrokes, TAG_PATH);
|
||||
pOldStrokes = pStrokes; // Save old pointer.
|
||||
pStrokes = ExAllocatePoolWithTag(PagedPool, numStrokes * sizeof(PPATH), TAG_PATH);
|
||||
RtlCopyMemory(pStrokes, pOldStrokes, numOldStrokes * sizeof(PPATH));
|
||||
numOldStrokes = numStrokes; // Save orig count.
|
||||
ExFreePoolWithTag(pOldStrokes, TAG_PATH); // Free old pointer.
|
||||
pStrokes[numStrokes - 1] = ExAllocatePoolWithTag(PagedPool, sizeof(PATH), TAG_PATH);
|
||||
|
||||
PATH_InitGdiPath(pStrokes[numStrokes - 1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue