Lines Matching +refs:format +refs:error

117         PictFormatPtr format = ps->formats;
121 if (format->type == PictTypeIndexed &&
122 format->index.pColormap == pColormap) {
123 (*ps->UpdateIndexed) (pScreen, format, ndef, pdef);
126 format++;
147 CARD32 format;
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;
172 CARD32 format;
184 formats[nformats].format = PICT_a1;
187 formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),
191 formats[nformats].format = PICT_a8r8g8b8;
194 formats[nformats].format = PICT_x8r8g8b8;
197 formats[nformats].format = PICT_b8g8r8a8;
200 formats[nformats].format = PICT_b8g8r8x8;
237 format = PICT_FORMAT(bpp, type, 0, r, g, b);
238 addFormat(formats, &nformats, format, depth);
243 format = PICT_VISFORMAT(bpp, PICT_TYPE_COLOR, v);
244 addFormat(formats, &nformats, format, depth);
248 format = PICT_VISFORMAT(bpp, PICT_TYPE_GRAY, v);
249 addFormat(formats, &nformats, format, depth);
259 format = 0;
303 format = formats[f].format;
304 pFormats[f].format = format;
305 switch (PICT_FORMAT_TYPE(format)) {
309 pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format));
312 pFormats[f].direct.alpha = (PICT_FORMAT_R(format) +
313 PICT_FORMAT_G(format) +
314 PICT_FORMAT_B(format));
316 pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format));
318 pFormats[f].direct.red = (PICT_FORMAT_G(format) +
319 PICT_FORMAT_B(format));
321 pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format));
323 pFormats[f].direct.green = PICT_FORMAT_B(format);
325 pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format));
333 pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format));
336 pFormats[f].direct.alpha = (PICT_FORMAT_B(format) +
337 PICT_FORMAT_G(format) +
338 PICT_FORMAT_R(format));
340 pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format));
342 pFormats[f].direct.blue = (PICT_FORMAT_G(format) +
343 PICT_FORMAT_R(format));
345 pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format));
347 pFormats[f].direct.green = PICT_FORMAT_R(format);
349 pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format));
357 pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format));
360 (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format));
362 pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format));
365 (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) -
366 PICT_FORMAT_G(format));
368 pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format));
371 (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) -
372 PICT_FORMAT_G(format) - PICT_FORMAT_R(format));
374 pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format));
383 pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format));
392 pScreen->visuals[PICT_FORMAT_VIS(format)].vid;
415 PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format)
419 if (format->type != PictTypeIndexed || format->index.pColormap)
422 if (format->index.vid == pScreen->rootVisual) {
423 dixLookupResourceByType((void **) &format->index.pColormap,
428 VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid);
434 &format->index.pColormap, AllocNone, 0)
438 if (!ps->InitIndexed(pScreen, format))
447 PictFormatPtr format;
452 format = ps->formats;
455 if (!PictureInitIndexedFormat(pScreen, format++))
500 PictFormatPtr format;
506 format = ps->formats;
523 if (format->depth == depth && format->type == type) {
525 if (format->index.vid == pVisual->vid)
526 return format;
529 if ((unsigned long)format->direct.redMask <<
530 format->direct.red == pVisual->redMask &&
531 (unsigned long)format->direct.greenMask <<
532 format->direct.green == pVisual->greenMask &&
533 (unsigned long)format->direct.blueMask <<
534 format->direct.blue == pVisual->blueMask) {
535 return format;
539 format++;
548 PictFormatPtr format;
553 format = ps->formats;
556 if (format->depth == depth && format->format == (f & 0xffffff))
557 return format;
558 format++;
673 formats[n].format = PICT_FORMAT(0, type, a, r, g, b);
747 Mask vmask, XID *vlist, ClientPtr client, int *error)
755 *error = BadAlloc;
762 pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24);
765 *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture,
767 if (*error != Success)
782 *error = ChangePicture(pPicture, vmask, vlist, 0, client);
784 *error = Success;
785 if (*error == Success)
786 *error = (*ps->CreatePicture) (pPicture);
788 if (*error != Success) {
807 xFixed * stopPoints, xRenderColor * stopColors, int *error)
813 *error = BadValue;
820 *error = BadValue;
828 *error = BadAlloc;
853 pPicture->format = PICT_a8r8g8b8;
860 CreateSolidPicture(Picture pid, xRenderColor * color, int *error)
866 *error = BadAlloc;
873 *error = BadAlloc;
886 int *error)
891 *error = BadValue;
897 *error = BadAlloc;
904 *error = BadAlloc;
913 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
914 if (*error) {
925 xRenderColor * colors, int *error)
931 *error = BadValue;
937 *error = BadAlloc;
944 *error = BadAlloc;
958 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
959 if (*error) {
969 int *error)
974 *error = BadValue;
980 *error = BadAlloc;
987 *error = BadAlloc;
996 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
997 if (*error) {
1047 int error = 0;
1052 while (vmask && !error) {
1068 error = BadValue;
1082 error = cpAlphaMap((void **) &pAlpha, pid, pScreen,
1084 if (error != Success) {
1091 error = BadMatch;
1098 if (!error) {
1140 error = cpClipMask((void **) &pPixmap, pid, pScreen,
1142 if (error != Success) {
1160 error = BadMatch;
1168 error = (*ps->ChangePictureClip) (pPicture, clipType,
1181 error = BadValue;
1194 error = BadValue;
1207 error = BadValue;
1220 error = BadValue;
1238 error = BadValue;
1244 error = BadValue;
1250 return error;
1443 no_src_alpha = PICT_FORMAT_COLOR(pSrc->format) &&
1444 PICT_FORMAT_A(pSrc->format) == 0 &&
1451 no_dst_alpha = PICT_FORMAT_COLOR(pDst->format) &&
1452 PICT_FORMAT_A(pDst->format) == 0 && pDst->alphaMap == NULL;