mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 16:51:39 +00:00
Allocate span memory for every clipping type, not only for one
svn path=/trunk/; revision=42741
This commit is contained in:
parent
9a8137bdd5
commit
d9bc76c65a
1 changed files with 11 additions and 8 deletions
|
@ -406,18 +406,21 @@ ClipobjToSpans(
|
|||
|
||||
ASSERT(Boundary->top <= Boundary->bottom && Boundary->left <= Boundary->right);
|
||||
|
||||
*Spans = NULL;
|
||||
*Count = Boundary->bottom - Boundary->top;
|
||||
if (*Count > 0)
|
||||
{
|
||||
*Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP);
|
||||
if (NULL == *Spans)
|
||||
{
|
||||
*Count = 0;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (NULL == ClipRegion || DC_TRIVIAL == ClipRegion->iDComplexity)
|
||||
{
|
||||
*Count = Boundary->bottom - Boundary->top;
|
||||
if (0 != *Count)
|
||||
{
|
||||
*Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP);
|
||||
if (NULL == *Spans)
|
||||
{
|
||||
*Count = 0;
|
||||
return FALSE;
|
||||
}
|
||||
for (i = 0; i < Boundary->bottom - Boundary->top; i++)
|
||||
{
|
||||
(*Spans)[i].X = Boundary->left;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue