Home | History | Annotate | Download | only in render

Lines Matching refs:formats

96         if (ps->formats[n].type == PictTypeIndexed)
97 (*ps->CloseIndexed) (pScreen, &ps->formats[n]);
100 free(ps->formats);
117 PictFormatPtr format = ps->formats;
152 addFormat(FormatInitRec formats[256], int *nformat, CARD32 format, CARD8 depth)
157 if (formats[n].format == format && formats[n].depth == depth)
159 formats[*nformat].format = format;
160 formats[*nformat].depth = depth;
171 FormatInitRec formats[1024];
183 /* formats required by protocol */
184 formats[nformats].format = PICT_a1;
185 formats[nformats].depth = 1;
187 formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),
189 formats[nformats].depth = 8;
191 formats[nformats].format = PICT_a8r8g8b8;
192 formats[nformats].depth = 32;
194 formats[nformats].format = PICT_x8r8g8b8;
195 formats[nformats].depth = 32;
197 formats[nformats].format = PICT_b8g8r8a8;
198 formats[nformats].depth = 32;
200 formats[nformats].format = PICT_b8g8r8x8;
201 formats[nformats].depth = 32;
204 /* now look through the depths and visuals adding other formats */
219 * Current rendering code supports only three direct formats,
238 addFormat(formats, &nformats, format, depth);
244 addFormat(formats, &nformats, format, depth);
249 addFormat(formats, &nformats, format, depth);
254 * Walk supported depths and add useful Direct formats
262 /* depth 12 formats */
264 addFormat(formats, &nformats, PICT_x4r4g4b4, pDepth->depth);
265 addFormat(formats, &nformats, PICT_x4b4g4r4, pDepth->depth);
267 /* depth 15 formats */
269 addFormat(formats, &nformats, PICT_x1r5g5b5, pDepth->depth);
270 addFormat(formats, &nformats, PICT_x1b5g5r5, pDepth->depth);
272 /* depth 16 formats */
274 addFormat(formats, &nformats, PICT_a1r5g5b5, pDepth->depth);
275 addFormat(formats, &nformats, PICT_a1b5g5r5, pDepth->depth);
276 addFormat(formats, &nformats, PICT_r5g6b5, pDepth->depth);
277 addFormat(formats, &nformats, PICT_b5g6r5, pDepth->depth);
278 addFormat(formats, &nformats, PICT_a4r4g4b4, pDepth->depth);
279 addFormat(formats, &nformats, PICT_a4b4g4r4, pDepth->depth);
284 addFormat(formats, &nformats, PICT_x8r8g8b8, pDepth->depth);
285 addFormat(formats, &nformats, PICT_x8b8g8r8, pDepth->depth);
288 addFormat(formats, &nformats, PICT_a2r10g10b10, pDepth->depth);
289 addFormat(formats, &nformats, PICT_x2r10g10b10, pDepth->depth);
290 addFormat(formats, &nformats, PICT_a2b10g10r10, pDepth->depth);
291 addFormat(formats, &nformats, PICT_x2b10g10r10, pDepth->depth);
302 pFormats[f].depth = formats[f].depth;
303 format = formats[f].format;
452 format = ps->formats;
506 format = ps->formats;
553 format = ps->formats;
610 PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats)
635 if (!formats) {
636 formats = PictureCreateDefaultFormats(pScreen, &nformats);
637 if (!formats)
642 (formats[n].id, PictFormatType, (void *) (formats + n))) {
645 FreeResource(formats[i].id, RT_NONE);
646 free(formats);
649 if (formats[n].type == PictTypeIndexed) {
651 PictureFindVisual(pScreen, formats[n].index.vid);
659 if ((formats[n].direct.redMask |
660 formats[n].direct.blueMask | formats[n].direct.greenMask) == 0)
662 else if (formats[n].direct.red > formats[n].direct.blue)
664 else if (formats[n].direct.red == 0)
668 a = Ones(formats[n].direct.alphaMask);
669 r = Ones(formats[n].direct.redMask);
670 g = Ones(formats[n].direct.greenMask);
671 b = Ones(formats[n].direct.blueMask);
673 formats[n].format = PICT_FORMAT(0, type, a, r, g, b);
677 free(formats);
682 ps->formats = formats;
683 ps->fallback = formats;
703 free(formats);