mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:42:57 +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,11 +406,8 @@ ClipobjToSpans(
|
||||||
|
|
||||||
ASSERT(Boundary->top <= Boundary->bottom && Boundary->left <= Boundary->right);
|
ASSERT(Boundary->top <= Boundary->bottom && Boundary->left <= Boundary->right);
|
||||||
|
|
||||||
*Spans = NULL;
|
|
||||||
if (NULL == ClipRegion || DC_TRIVIAL == ClipRegion->iDComplexity)
|
|
||||||
{
|
|
||||||
*Count = Boundary->bottom - Boundary->top;
|
*Count = Boundary->bottom - Boundary->top;
|
||||||
if (0 != *Count)
|
if (*Count > 0)
|
||||||
{
|
{
|
||||||
*Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP);
|
*Spans = ExAllocatePoolWithTag(PagedPool, *Count * sizeof(SPAN), TAG_CLIP);
|
||||||
if (NULL == *Spans)
|
if (NULL == *Spans)
|
||||||
|
@ -418,6 +415,12 @@ ClipobjToSpans(
|
||||||
*Count = 0;
|
*Count = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NULL == ClipRegion || DC_TRIVIAL == ClipRegion->iDComplexity)
|
||||||
|
{
|
||||||
|
if (0 != *Count)
|
||||||
|
{
|
||||||
for (i = 0; i < Boundary->bottom - Boundary->top; i++)
|
for (i = 0; i < Boundary->bottom - Boundary->top; i++)
|
||||||
{
|
{
|
||||||
(*Spans)[i].X = Boundary->left;
|
(*Spans)[i].X = Boundary->left;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue