Exemplo n.º 1
0
Arquivo: xaaBitmap.c Projeto: aosm/X11
static CARD32*
BitmapScanline_Shifted_Inverted_Careful(
   CARD32 *bits, CARD32 *base,
   int count, int skipleft )
{
     register CARD32 tmp;
     while(--count) {
	tmp = ~(SHIFT_R(*bits,skipleft) | SHIFT_L(*(bits + 1),(32 - skipleft)));
	WRITE_BITS(tmp);
	bits++;
     }
     tmp = ~(SHIFT_R(*bits,skipleft));
     WRITE_BITS(tmp);
     return base;
}
Exemplo n.º 2
0
void 
EXPNAME(XAATEGlyphRenderer)(
    ScrnInfoPtr pScrn,
    int x, int y, int w, int h, int skipleft, int startline, 
    unsigned int **glyphs, int glyphWidth,
    int fg, int bg, int rop, unsigned planemask
)
{
    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
    CARD32* base;
    GlyphScanlineFuncPtr GlyphFunc = glyph_scanline_func[glyphWidth - 1];
    int dwords = 0;

    if((bg != -1) && (infoRec->TEGlyphRendererFlags & TRANSPARENCY_ONLY)) {
    	(*infoRec->SetupForSolidFill)(pScrn, bg, rop, planemask);
        (*infoRec->SubsequentSolidFillRect)(pScrn, x, y, w, h);
	bg = -1;
    }

    (*infoRec->SetupForCPUToScreenColorExpandFill)(
				pScrn, fg, bg, rop, planemask);

    if(skipleft && 
	 (!(infoRec->TEGlyphRendererFlags & LEFT_EDGE_CLIPPING) || 
	 (!(infoRec->TEGlyphRendererFlags & LEFT_EDGE_CLIPPING_NEGATIVE_X) && 
		(skipleft > x)))) {
	    /* draw the first character only */

	    int count = h, line = startline;
            int width = glyphWidth - skipleft;

	    if(width > w) width = w;

            (*infoRec->SubsequentCPUToScreenColorExpandFill)(
						pScrn, x, y, width, h, 0);

	    base = (CARD32*)infoRec->ColorExpandBase;

	    while(count--) {
		register CARD32 tmp = SHIFT_R(glyphs[0][line++],skipleft);
		WRITE_BITS(tmp);
	    }
    
	    w -= width;
	    if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) &&
			((((width + 31) >> 5) * h) & 1)) {
		base = (CARD32*)infoRec->ColorExpandBase;
		base[0] = 0x00000000;
	    }
	    if(!w) goto THE_END;
	    glyphs++;
            x += width;
	    skipleft = 0;	/* nicely aligned again */
    } 
Exemplo n.º 3
0
Arquivo: xaaBitmap.c Projeto: aosm/X11
static CARD32*
BitmapScanline_Shifted(
   CARD32 *bits, CARD32 *base,
   int count, int skipleft )
{
     while(count--) {
	register CARD32 tmp = SHIFT_R(*bits,skipleft) | 
			      SHIFT_L(*(bits + 1),(32 - skipleft));
	WRITE_BITS(tmp);
	bits++;
     }
     return base;
}
Exemplo n.º 4
0
Arquivo: xaaBitmap.c Projeto: aosm/X11
static CARD32*
BitmapScanline_Shifted(
   CARD32 *src, CARD32 *base,
   int count, int skipleft )
{
     CARD32 bits;

     while(count >= 3) {
	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
	WRITE_BITS3(bits);
	src++;
	count -= 3;
     }
     if (count == 2) {
	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
	WRITE_BITS2(bits);
     } else if (count == 1) {
	bits = SHIFT_R(*src,skipleft) | SHIFT_L(*(src + 1),(32 - skipleft));
	WRITE_BITS1(bits);
     }
     
     return base;
}