Lines Matching refs:bits

66     CursorBitsPtr bits;  member
77 FreeCursorBits(CursorBitsPtr bits) in FreeCursorBits() argument
79 if (--bits->refcnt > 0) in FreeCursorBits()
81 free(bits->source); in FreeCursorBits()
82 free(bits->mask); in FreeCursorBits()
83 free(bits->argb); in FreeCursorBits()
84 dixFiniPrivates(bits, PRIVATE_CURSOR_BITS); in FreeCursorBits()
85 if (bits->refcnt == 0) { in FreeCursorBits()
89 (this = *prev) && (this->bits != bits); prev = &this->next); in FreeCursorBits()
95 free(bits); in FreeCursorBits()
124 FreeCursorBits(pCurs->bits); in FreeCursor()
157 CheckForEmptyMask(CursorBitsPtr bits) in CheckForEmptyMask() argument
159 unsigned char *msk = bits->mask; in CheckForEmptyMask()
160 int n = BitmapBytePad(bits->width) * bits->height; in CheckForEmptyMask()
162 bits->emptyMask = FALSE; in CheckForEmptyMask()
166 if (bits->argb) { in CheckForEmptyMask()
167 CARD32 *argb = bits->argb; in CheckForEmptyMask()
169 n = bits->width * bits->height; in CheckForEmptyMask()
174 bits->emptyMask = TRUE; in CheckForEmptyMask()
244 CursorBitsPtr bits; in AllocARGBCursor() local
253 bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); in AllocARGBCursor()
255 dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS) in AllocARGBCursor()
256 bits->source = psrcbits; in AllocARGBCursor()
257 bits->mask = pmaskbits; in AllocARGBCursor()
258 bits->argb = argb; in AllocARGBCursor()
259 bits->width = cm->width; in AllocARGBCursor()
260 bits->height = cm->height; in AllocARGBCursor()
261 bits->xhot = cm->xhot; in AllocARGBCursor()
262 bits->yhot = cm->yhot; in AllocARGBCursor()
264 bits->refcnt = -1; in AllocARGBCursor()
265 CheckForEmptyMask(bits); in AllocARGBCursor()
266 pCurs->bits = bits; in AllocARGBCursor()
293 size_t i, size = bits->width * bits->height; in AllocARGBCursor()
317 FreeCursorBits(bits); in AllocARGBCursor()
335 CursorBitsPtr bits; in AllocGlyphCursor() local
365 bits = pShare->bits; in AllocGlyphCursor()
366 bits->refcnt++; in AllocGlyphCursor()
399 bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); in AllocGlyphCursor()
401 bits = (CursorBitsPtr) NULL; in AllocGlyphCursor()
406 bits = (CursorBitsPtr) calloc(CURSOR_BITS_SIZE, 1); in AllocGlyphCursor()
408 bits = (CursorBitsPtr) NULL; in AllocGlyphCursor()
410 if (!bits) { in AllocGlyphCursor()
417 dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS); in AllocGlyphCursor()
418 bits->source = srcbits; in AllocGlyphCursor()
419 bits->mask = mskbits; in AllocGlyphCursor()
420 bits->argb = 0; in AllocGlyphCursor()
421 bits->width = cm.width; in AllocGlyphCursor()
422 bits->height = cm.height; in AllocGlyphCursor()
423 bits->xhot = cm.xhot; in AllocGlyphCursor()
424 bits->yhot = cm.yhot; in AllocGlyphCursor()
426 bits->refcnt = -1; in AllocGlyphCursor()
428 bits->refcnt = 1; in AllocGlyphCursor()
431 FreeCursorBits(bits); in AllocGlyphCursor()
438 pShare->bits = bits; in AllocGlyphCursor()
444 CheckForEmptyMask(bits); in AllocGlyphCursor()
445 pCurs->bits = bits; in AllocGlyphCursor()
474 FreeCursorBits(bits); in AllocGlyphCursor()