summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2009-03-17 19:34:45 +0100
committerMaarten Maathuis <madman2003@gmail.com>2009-03-18 19:36:18 +0100
commita635bb5357648779815ec6729d55f6b478493213 (patch)
treef1de498f96e089182bfb4259bc41996749939305
parentec328783593339e33772301a8c5fea35fd63c0a2 (diff)
exa: round of fb_pitch to the next byte
-rw-r--r--exa/exa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/exa/exa.c b/exa/exa.c
index 3fcb3e248..ecb2117cf 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -258,9 +258,9 @@ exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap,
int w, int h, int bpp)
{
if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1)
- pExaPixmap->fb_pitch = (1 << (exaLog2(w - 1) + 1)) * bpp / 8;
+ pExaPixmap->fb_pitch = ((1 << (exaLog2(w - 1) + 1)) * bpp + 7) / 8;
else
- pExaPixmap->fb_pitch = w * bpp / 8;
+ pExaPixmap->fb_pitch = (w * bpp + 7) / 8;
pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch,
pExaScr->info->pixmapPitchAlign);