[PATCH 04/18] exa: switch to byte counting functions.
Peter Hutterer
peter.hutterer at who-t.net
Wed Jul 8 17:05:02 PDT 2009
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
exa/exa.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/exa/exa.c b/exa/exa.c
index d04ea71..750a4a6 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 * num_bytes_for_bits(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 = num_bytes_for_bits((1 << (exaLog2(w - 1) + 1)) * bpp);
else
- pExaPixmap->fb_pitch = (w * bpp + 7) / 8;
+ pExaPixmap->fb_pitch = num_bytes_for_bits(w * bpp);
pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch,
pExaScr->info->pixmapPitchAlign);
--
1.6.3.rc1.2.g0164.dirty
More information about the xorg-devel
mailing list