diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-03-17 19:34:45 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2009-03-18 19:36:18 +0100 |
commit | a635bb5357648779815ec6729d55f6b478493213 (patch) | |
tree | f1de498f96e089182bfb4259bc41996749939305 | |
parent | ec328783593339e33772301a8c5fea35fd63c0a2 (diff) |
exa: round of fb_pitch to the next byte
-rw-r--r-- | exa/exa.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |