Lines Matching +refs:format +refs:error
108 PictFormatPtr format = ps->formats;
113 if (format->type == PictTypeIndexed &&
114 format->index.pColormap == pColormap)
116 (*ps->UpdateIndexed) (pScreen, format, ndef, pdef);
119 format++;
141 CARD32 format;
148 CARD32 format,
154 if (formats[n].format == format && formats[n].depth == depth)
156 formats[nformat].format = format;
169 CARD32 format;
181 formats[nformats].format = PICT_a1;
184 formats[nformats].format = PICT_FORMAT(BitsPerPixel(8),
189 formats[nformats].format = PICT_FORMAT(BitsPerPixel(4),
194 formats[nformats].format = PICT_a8r8g8b8;
197 formats[nformats].format = PICT_x8r8g8b8;
200 formats[nformats].format = PICT_b8g8r8a8;
203 formats[nformats].format = PICT_b8g8r8x8;
246 format = PICT_FORMAT(bpp, type, 0, r, g, b);
247 nformats = addFormat (formats, nformats, format, depth);
252 format = PICT_VISFORMAT (bpp, PICT_TYPE_COLOR, v);
253 nformats = addFormat (formats, nformats, format, depth);
257 format = PICT_VISFORMAT (bpp, PICT_TYPE_GRAY, v);
258 nformats = addFormat (formats, nformats, format, depth);
269 format = 0;
345 format = formats[f].format;
346 pFormats[f].format = format;
347 switch (PICT_FORMAT_TYPE(format)) {
351 pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
353 pFormats[f].direct.alpha = (PICT_FORMAT_R(format) +
354 PICT_FORMAT_G(format) +
355 PICT_FORMAT_B(format));
357 pFormats[f].direct.redMask = Mask(PICT_FORMAT_R(format));
358 pFormats[f].direct.red = (PICT_FORMAT_G(format) +
359 PICT_FORMAT_B(format));
361 pFormats[f].direct.greenMask = Mask(PICT_FORMAT_G(format));
362 pFormats[f].direct.green = PICT_FORMAT_B(format);
364 pFormats[f].direct.blueMask = Mask(PICT_FORMAT_B(format));
371 pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
373 pFormats[f].direct.alpha = (PICT_FORMAT_B(format) +
374 PICT_FORMAT_G(format) +
375 PICT_FORMAT_R(format));
377 pFormats[f].direct.blueMask = Mask(PICT_FORMAT_B(format));
378 pFormats[f].direct.blue = (PICT_FORMAT_G(format) +
379 PICT_FORMAT_R(format));
381 pFormats[f].direct.greenMask = Mask(PICT_FORMAT_G(format));
382 pFormats[f].direct.green = PICT_FORMAT_R(format);
384 pFormats[f].direct.redMask = Mask(PICT_FORMAT_R(format));
391 pFormats[f].direct.blueMask = Mask(PICT_FORMAT_B(format));
392 pFormats[f].direct.blue = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format));
394 pFormats[f].direct.greenMask = Mask(PICT_FORMAT_G(format));
395 pFormats[f].direct.green = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) -
396 PICT_FORMAT_G(format));
398 pFormats[f].direct.redMask = Mask(PICT_FORMAT_R(format));
399 pFormats[f].direct.red = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) -
400 PICT_FORMAT_G(format) - PICT_FORMAT_R(format));
402 pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
410 pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format));
418 pFormats[f].index.vid = pScreen->visuals[PICT_FORMAT_VIS(format)].vid;
442 PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format)
446 if (format->type != PictTypeIndexed || format->index.pColormap)
449 if (format->index.vid == pScreen->rootVisual) {
450 dixLookupResourceByType((pointer *)&format->index.pColormap,
454 VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid);
456 &format->index.pColormap, AllocNone, 0)
460 if (!ps->InitIndexed(pScreen, format))
469 PictFormatPtr format;
474 format = ps->formats;
477 if (!PictureInitIndexedFormat(pScreen, format++))
523 PictFormatPtr format;
529 format = ps->formats;
547 if (format->depth == depth && format->type == type)
551 if (format->index.vid == pVisual->vid)
552 return format;
556 if (format->direct.redMask << format->direct.red ==
558 format->direct.greenMask << format->direct.green ==
560 format->direct.blueMask << format->direct.blue ==
563 return format;
567 format++;
576 PictFormatPtr format;
581 format = ps->formats;
585 if (format->depth == depth && format->format == (f & 0xffffff))
586 return format;
587 format++;
674 formats[n].format = PICT_FORMAT(0,type,a,r,g,b);
754 int *error)
762 *error = BadAlloc;
769 pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24);
772 *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture,
774 if (*error != Success)
791 *error = ChangePicture (pPicture, vmask, vlist, 0, client);
793 *error = Success;
794 if (*error == Success)
795 *error = (*ps->CreatePicture) (pPicture);
797 if (*error != Success)
860 xFixed *stopPoints, xRenderColor *stopColors, int *error)
866 *error = BadValue;
873 *error = BadValue;
881 *error = BadAlloc;
905 pPicture->format = PICT_a8r8g8b8;
912 CreateSolidPicture (Picture pid, xRenderColor *color, int *error)
917 *error = BadAlloc;
924 *error = BadAlloc;
935 int nStops, xFixed *stops, xRenderColor *colors, int *error)
940 *error = BadValue;
946 *error = BadAlloc;
953 *error = BadAlloc;
962 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
963 if (*error) {
975 int nStops, xFixed *stops, xRenderColor *colors, int *error)
981 *error = BadValue;
987 *error = BadAlloc;
994 *error = BadAlloc;
1014 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
1015 if (*error) {
1024 int nStops, xFixed *stops, xRenderColor *colors, int *error)
1029 *error = BadValue;
1035 *error = BadAlloc;
1042 *error = BadAlloc;
1051 initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
1052 if (*error) {
1073 int error = 0;
1078 while (vmask && !error)
1097 error = BadValue;
1113 error = dixLookupResourceByType((pointer *)&pAlpha, pid,
1116 if (error != Success)
1125 error = BadMatch;
1132 if (!error)
1173 error = dixLookupResourceByType((pointer *)&pPixmap, pid,
1176 if (error != Success)
1197 error = BadMatch;
1206 error = (*ps->ChangePictureClip)(pPicture, clipType,
1219 error = BadValue;
1232 error = BadValue;
1245 error = BadValue;
1258 error = BadValue;
1275 error = BadValue;
1281 error = BadValue;
1287 return error;
1593 no_src_alpha = PICT_FORMAT_COLOR(pSrc->format) &&
1594 PICT_FORMAT_A(pSrc->format) == 0 &&
1602 no_dst_alpha = PICT_FORMAT_COLOR(pDst->format) &&
1603 PICT_FORMAT_A(pDst->format) == 0 &&