mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 01:59:56 +00:00
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:
@@ -968,7 +968,7 @@ localAllocateOffscreenLinear(
|
||||
linear->size = h * w;
|
||||
linear->offset = (pitch * area->box.y1) + area->box.x1;
|
||||
if (gran > 1)
|
||||
linear->offset += ((linear->offset + gran - 1) / gran) * gran;
|
||||
linear->offset = ((linear->offset + gran - 1) / gran) * gran;
|
||||
linear->granularity = gran;
|
||||
linear->MoveLinearCallback = moveCB;
|
||||
linear->RemoveLinearCallback = removeCB;
|
||||
|
||||
Reference in New Issue
Block a user