mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
treewide: replace PICT_FORMAT_TYPE by PIXMAN_FORMAT_TYPE
Try not to use old compat macros anymore, use the real ones instead. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
c2c19fc7fe
commit
803355e874
@@ -260,7 +260,7 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs,
|
||||
|
||||
/* Initialize the visual */
|
||||
visual->bitsPerRGBValue = 8;
|
||||
if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) {
|
||||
if (PIXMAN_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) {
|
||||
visual->class = PseudoColor;
|
||||
visual->nplanes = PIXMAN_FORMAT_BPP(alt->format);
|
||||
visual->ColormapEntries = 1 << visual->nplanes;
|
||||
|
||||
@@ -149,7 +149,7 @@ exaGetPixelFromRGBA(CARD32 *pixel,
|
||||
*pixel = 0;
|
||||
|
||||
if (!PICT_FORMAT_COLOR(pFormat->format) &&
|
||||
PICT_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A)
|
||||
PIXMAN_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A)
|
||||
return FALSE;
|
||||
|
||||
rbits = PICT_FORMAT_R(pFormat->format);
|
||||
@@ -181,7 +181,7 @@ exaGetRGBAFromPixel(CARD32 pixel,
|
||||
int rbits, bbits, gbits;
|
||||
int rshift, bshift, gshift, ashift;
|
||||
|
||||
if (!PICT_FORMAT_COLOR(format) && PICT_FORMAT_TYPE(format) != PICT_TYPE_A)
|
||||
if (!PICT_FORMAT_COLOR(format) && PIXMAN_FORMAT_TYPE(format) != PICT_TYPE_A)
|
||||
return FALSE;
|
||||
|
||||
rbits = PICT_FORMAT_R(format);
|
||||
@@ -906,7 +906,7 @@ exaComposite(CARD8 op,
|
||||
(PICT_FORMAT_COLOR(pDst->format) &&
|
||||
PICT_FORMAT_COLOR(pSrc->format) &&
|
||||
pDst->format == PICT_FORMAT(PIXMAN_FORMAT_BPP(pSrc->format),
|
||||
PICT_FORMAT_TYPE(pSrc->format),
|
||||
PIXMAN_FORMAT_TYPE(pSrc->format),
|
||||
0,
|
||||
PICT_FORMAT_R(pSrc->format),
|
||||
PICT_FORMAT_G(pSrc->format),
|
||||
|
||||
@@ -759,21 +759,21 @@ combine_pict_format(PictFormatShort * des, const PictFormatShort src,
|
||||
|
||||
switch (in_ca) {
|
||||
case glamor_program_alpha_normal:
|
||||
src_type = PICT_FORMAT_TYPE(src);
|
||||
src_type = PIXMAN_FORMAT_TYPE(src);
|
||||
mask_type = PICT_TYPE_A;
|
||||
break;
|
||||
case glamor_program_alpha_ca_first:
|
||||
src_type = PICT_FORMAT_TYPE(src);
|
||||
mask_type = PICT_FORMAT_TYPE(mask);
|
||||
src_type = PIXMAN_FORMAT_TYPE(src);
|
||||
mask_type = PIXMAN_FORMAT_TYPE(mask);
|
||||
break;
|
||||
case glamor_program_alpha_ca_second:
|
||||
src_type = PICT_TYPE_A;
|
||||
mask_type = PICT_FORMAT_TYPE(mask);
|
||||
mask_type = PIXMAN_FORMAT_TYPE(mask);
|
||||
break;
|
||||
case glamor_program_alpha_dual_blend:
|
||||
case glamor_program_alpha_dual_blend_gles2:
|
||||
src_type = PICT_FORMAT_TYPE(src);
|
||||
mask_type = PICT_FORMAT_TYPE(mask);
|
||||
src_type = PIXMAN_FORMAT_TYPE(src);
|
||||
mask_type = PIXMAN_FORMAT_TYPE(mask);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
@@ -1552,7 +1552,7 @@ glamor_composite_clipped_region(CARD8 op,
|
||||
|| (PICT_FORMAT_COLOR(dest->format)
|
||||
&& PICT_FORMAT_COLOR(source->format)
|
||||
&& dest->format == PICT_FORMAT(PIXMAN_FORMAT_BPP(source->format),
|
||||
PICT_FORMAT_TYPE(source->format),
|
||||
PIXMAN_FORMAT_TYPE(source->format),
|
||||
0,
|
||||
PICT_FORMAT_R(source->format),
|
||||
PICT_FORMAT_G(source->format),
|
||||
|
||||
@@ -601,22 +601,22 @@ glamor_get_rgba_from_pixel(CARD32 pixel,
|
||||
bbits = PICT_FORMAT_B(format);
|
||||
int abits = PIXMAN_FORMAT_A(format);
|
||||
|
||||
if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) {
|
||||
if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_A) {
|
||||
rshift = gshift = bshift = ashift = 0;
|
||||
}
|
||||
else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) {
|
||||
else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_ARGB) {
|
||||
bshift = 0;
|
||||
gshift = bbits;
|
||||
rshift = gshift + gbits;
|
||||
ashift = rshift + rbits;
|
||||
}
|
||||
else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) {
|
||||
else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_ABGR) {
|
||||
rshift = 0;
|
||||
gshift = rbits;
|
||||
bshift = gshift + gbits;
|
||||
ashift = bshift + bbits;
|
||||
}
|
||||
else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
|
||||
else if (PIXMAN_FORMAT_TYPE(format) == PICT_TYPE_BGRA) {
|
||||
ashift = 0;
|
||||
rshift = abits;
|
||||
if (abits == 0)
|
||||
|
||||
@@ -444,7 +444,7 @@ miIsSolidAlpha(PicturePtr pSrc)
|
||||
pScreen = pSrc->pDrawable->pScreen;
|
||||
|
||||
/* Alpha-only */
|
||||
if (PICT_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A)
|
||||
if (PIXMAN_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A)
|
||||
return FALSE;
|
||||
/* repeat */
|
||||
if (!pSrc->repeat)
|
||||
|
||||
@@ -292,7 +292,7 @@ PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp)
|
||||
pFormats[f].depth = formats[f].depth;
|
||||
format = formats[f].format;
|
||||
pFormats[f].format = format;
|
||||
switch (PICT_FORMAT_TYPE(format)) {
|
||||
switch (PIXMAN_FORMAT_TYPE(format)) {
|
||||
case PICT_TYPE_ARGB:
|
||||
pFormats[f].type = PictTypeDirect;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user