mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Align scanline to multiple of 16, required for ASM
This commit is contained in:
@@ -176,8 +176,9 @@ UINT xf_OutputExpose(xfContext* xfc, UINT32 x, UINT32 y,
|
||||
return status;
|
||||
}
|
||||
|
||||
static INLINE UINT32 x11_pad_scanline(UINT32 scanline, UINT32 inPad)
|
||||
UINT32 x11_pad_scanline(UINT32 scanline, UINT32 inPad)
|
||||
{
|
||||
/* Ensure X11 alignment is met */
|
||||
if (inPad > 0)
|
||||
{
|
||||
const UINT32 align = inPad / 8;
|
||||
@@ -187,6 +188,10 @@ static INLINE UINT32 x11_pad_scanline(UINT32 scanline, UINT32 inPad)
|
||||
scanline += pad;
|
||||
}
|
||||
|
||||
/* 16 byte alingment is required for ASM optimized code */
|
||||
if (scanline % 16)
|
||||
scanline += 16 - scanline % 16;
|
||||
|
||||
return scanline;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user