Lines Matching defs:fmt
146 pixman_format_code_t fmt = pixman_image_get_format (img);
154 if (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt) &&
155 PIXMAN_FORMAT_DEPTH (fmt) != 0)
157 uint32_t m = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1;
159 if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA ||
160 PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA)
162 m <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt));
169 if (remove_alpha && PIXMAN_FORMAT_A (fmt))
173 if (PIXMAN_FORMAT_BPP (fmt) == 32)
176 m = (1 << PIXMAN_FORMAT_BPP (fmt)) - 1;
178 m >>= PIXMAN_FORMAT_A (fmt);
180 if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA ||
181 PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA ||
182 PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_A)
185 m <<= PIXMAN_FORMAT_A (fmt);
192 if (remove_rgb && PIXMAN_FORMAT_RGB (fmt))
194 uint32_t m = ((uint32_t)~0) >> (32 - PIXMAN_FORMAT_BPP (fmt));
195 uint32_t size = PIXMAN_FORMAT_R (fmt) + PIXMAN_FORMAT_G (fmt) + PIXMAN_FORMAT_B (fmt);
199 if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA ||
200 PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA)
209 for (i = 0; i * PIXMAN_FORMAT_BPP (fmt) < 32; i++)
210 mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt));