aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xres.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xres.c')
-rw-r--r--xorg-server/Xext/xres.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xorg-server/Xext/xres.c b/xorg-server/Xext/xres.c
index 32e8c8135..c63046f8f 100644
--- a/xorg-server/Xext/xres.c
+++ b/xorg-server/Xext/xres.c
@@ -350,9 +350,9 @@ static unsigned long
ResGetApproxPixmapBytes(PixmapPtr pix)
{
unsigned long nPixels;
- int bytesPerPixel;
+ float bytesPerPixel;
- bytesPerPixel = pix->drawable.bitsPerPixel >> 3;
+ bytesPerPixel = (float)pix->drawable.bitsPerPixel / 8.0;
nPixels = pix->drawable.width * pix->drawable.height;
/* Divide by refcnt as pixmap could be shared between clients,