예제 #1
0
/*
 * Pad pixmap to FB_UNIT bits wide
 */
void
fbPadPixmap (PixmapPtr pPixmap)
{
    int	    width;
    FbBits  *bits;
    FbBits  b;
    FbBits  mask;
    int	    height;
    int	    w;
    int     stride;
    int     bpp;
    int     xOff, yOff;

    fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff);

    width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel;
    height = pPixmap->drawable.height;
    mask = FbBitsMask (0, width);
    while (height--)
    {
	b = *bits & mask;
	w = width;
	while (w < FB_UNIT)
	{
	    b = b | FbScrRight(b, w);
	    w <<= 1;
	}
	*bits = b;
	bits += stride;
    }
}
예제 #2
0
/*
 * Pad pixmap to FB_UNIT bits wide
 */
void
fbPadPixmap(PixmapPtr pPixmap)
{
    int width;
    FbBits *bits;
    FbBits b;
    FbBits mask;
    int height;
    int w;
    int stride;
    int bpp;
    _X_UNUSED int xOff, yOff;

    fbGetDrawable(&pPixmap->drawable, bits, stride, bpp, xOff, yOff);

    width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel;
    height = pPixmap->drawable.height;
    mask = FbBitsMask(0, width);
    while (height--) {
        b = READ(bits) & mask;
        w = width;
        while (w < FB_UNIT) {
            b = b | FbScrRight(b, w);
            w <<= 1;
        }
        WRITE(bits, b);
        bits += stride;
    }

    fbFinishAccess(&pPixmap->drawable);
}
예제 #3
0
/*
 * Pad pixmap to FB_UNIT bits wide
 */
void
fbPadPixmap (PixmapPtr pPixmap)
{
    int	    width;
    FbBits  *bits;
    FbBits  b;
    FbBits  mask;
    int	    height;
    int	    w;

    width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel;
    bits = pPixmap->devPrivate.ptr;
    height = pPixmap->drawable.height;
    mask = FbBitsMask (0, width);
    while (height--)
    {
	b = *bits & mask;
	w = width;
	while (w < FB_UNIT)
	{
	    b = b | FbScrRight(b, w);
	    w <<= 1;
	}
	*bits++ = b;
    }
}