diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-06 12:03:34 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-07-14 10:13:26 +1000 |
commit | dc82e11e509ecf586d77c3e7c1325d515509ce51 (patch) | |
tree | 2bdbef73e328a7d48aedf9093c71f10398a7b4ed | |
parent | 2d35ea8d957a955e1200ba2b14424bddfe1f4148 (diff) |
exa: switch to byte counting functions.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Michel Dänzer <michel@daenzer.net>
-rw-r--r-- | exa/exa.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -236,7 +236,7 @@ exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, pExaPixmap->accel_blocked = 0; if (pExaScr->info->maxPitchPixels) { - int max_pitch = pExaScr->info->maxPitchPixels * (bpp + 7) / 8; + int max_pitch = pExaScr->info->maxPitchPixels * bits_to_bytes(bpp); if (pExaPixmap->fb_pitch > max_pitch) pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; @@ -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 + 7) / 8; + pExaPixmap->fb_pitch = bits_to_bytes((1 << (exaLog2(w - 1) + 1)) * bpp); else - pExaPixmap->fb_pitch = (w * bpp + 7) / 8; + pExaPixmap->fb_pitch = bits_to_bytes(w * bpp); pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, pExaScr->info->pixmapPitchAlign); |