Lines Matching refs:tt
86 struct test_target tt;
94 test_target_create_render(&t->out, target, &tt);
102 int x = rand() % (tt.width - 1);
103 int y = rand() % (tt.height - 1);
109 fill_rect(&t->out, tt.picture, tt.format,
116 cells[y*tt.width+x] = color(red, green, blue, alpha);
119 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
126 XShmGetImage(t->out.dpy, tt.draw, &image,
131 cells[y*tt.width+x])) {
136 cells[y*tt.width+x] & mask,
137 cells[y*tt.width+x],
145 test_target_destroy_render(&t->out, &tt);
150 static void clear(struct test_display *dpy, struct test_target *tt)
153 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
154 0, 0, tt->width, tt->height);
159 struct test_target tt;
167 test_target_create_render(&t->out, target, &tt);
168 clear(&t->out, &tt);
170 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
174 int w = 1 + rand() % (tt.width - 1);
175 int h = 1 + rand() % (tt.height - 1);
181 x = rand() % (2*tt.width) - tt.width;
182 y = rand() % (2*tt.height) - tt.height;
184 fill_rect(&t->out, tt.picture, tt.format,
193 if (x >= tt.width || y >= tt.height)
196 if (x + w > tt.width)
197 w = tt.width - x;
198 if (y + h > tt.height)
199 h = tt.height - y;
203 pixman_fill(cells, tt.width, 32, x, y, w, h,
207 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
209 for (y = 0; y < tt.height; y++) {
210 for (x = 0; x < tt.width; x++) {
215 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
220 x, y, tt.width, tt.height);
224 cells[y*tt.width+x] & mask,
225 cells[y*tt.width+x],
235 test_target_destroy_render(&t->out, &tt);