summaryrefslogtreecommitdiff
path: root/exa
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-06 12:03:34 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-14 10:13:26 +1000
commitdc82e11e509ecf586d77c3e7c1325d515509ce51 (patch)
tree2bdbef73e328a7d48aedf9093c71f10398a7b4ed /exa
parent2d35ea8d957a955e1200ba2b14424bddfe1f4148 (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>
Diffstat (limited to 'exa')
-rw-r--r--exa/exa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/exa/exa.c b/exa/exa.c
index d04ea71e0..608c81f5f 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -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);