Lines Matching refs:bits
34 uint32_t *bits = pixman_image_get_data (image);
36 fence_free (bits);
42 uint32_t *bits;
47 bits = (uint32_t *)make_random_bytes (WIDTH * HEIGHT * bpp);
49 bits = (uint32_t *)make_random_floats (WIDTH * HEIGHT * bpp);
51 image = pixman_image_create_bits (format, WIDTH, HEIGHT, bits, WIDTH * bpp);
53 if (image && bits)
62 uint8_t *bits;
81 bits = (uint8_t *)image->bits.bits;
83 if (image->bits.format == PIXMAN_a8)
85 r = bits[y * WIDTH + x];
88 else if (image->bits.format == PIXMAN_a2r10g10b10)
90 r = ((uint32_t *)bits)[y * WIDTH + x] >> 30;
93 else if (image->bits.format == PIXMAN_a8r8g8b8)
95 r = ((uint32_t *)bits)[y * WIDTH + x] >> 24;
98 else if (image->bits.format == PIXMAN_a4r4g4b4)
100 r = ((uint16_t *)bits)[y * WIDTH + x] >> 12;
103 else if (image->bits.format == PIXMAN_rgba_float)
105 return ((float *)bits)[y * WIDTH * 4 + x * 4 + 3];
117 uint8_t *bits;
120 bits = (uint8_t *)image->bits.bits;
122 if (image->bits.format == PIXMAN_a8)
126 else if (image->bits.format == PIXMAN_a2r10g10b10)
128 r = ((uint32_t *)bits)[y * WIDTH + x] >> 14;
132 else if (image->bits.format == PIXMAN_a8r8g8b8)
134 r = ((uint32_t *)bits)[y * WIDTH + x] >> 16;
138 else if (image->bits.format == PIXMAN_a4r4g4b4)
140 r = ((uint16_t *)bits)[y * WIDTH + x] >> 8;
145 else if (image->bits.format == PIXMAN_rgba_float)
147 double tmp = ((float *)bits)[y * WIDTH * 4 + x * 4];
289 printf ("%d red bits\n", n_red_bits);