Bug #9931: Fix linear allocations with a non-1-byte granularity.

This was introduced in 83080809f9.  Instead of
aligning the offset, it doubled it.  Results were appropriately spectacular.
This commit is contained in:
Eric Anholt 2007-03-06 16:18:59 -08:00
parent 9d94c13759
commit 024bbc7cbb

View File

@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
linear->size = h * w; linear->size = h * w;
linear->offset = (pitch * area->box.y1) + area->box.x1; linear->offset = (pitch * area->box.y1) + area->box.x1;
if (gran > 1) if (gran > 1)
linear->offset += ((linear->offset + gran - 1) / gran) * gran; linear->offset = ((linear->offset + gran - 1) / gran) * gran;
linear->granularity = gran; linear->granularity = gran;
linear->MoveLinearCallback = moveCB; linear->MoveLinearCallback = moveCB;
linear->RemoveLinearCallback = removeCB; linear->RemoveLinearCallback = removeCB;