Lines Matching refs:tt
69 struct test_target tt;
77 test_target_create_render(&t->out, target, &tt);
85 int x = rand() % (tt.width - 1);
86 int y = rand() % (tt.height - 1);
91 fill_rect(&t->out, tt.picture,
97 cells[y*tt.width+x] = color(red, green, blue, 0xff);
100 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
107 XShmGetImage(t->out.dpy, tt.draw, &image,
112 cells[y*tt.width+x])) {
117 cells[y*tt.width+x] & mask,
118 cells[y*tt.width+x],
126 test_target_destroy_render(&t->out, &tt);
131 static void clear(struct test_display *dpy, struct test_target *tt)
134 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
135 0, 0, tt->width, tt->height);
140 struct test_target tt;
148 test_target_create_render(&t->out, target, &tt);
149 clear(&t->out, &tt);
151 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
155 int w = 1 + rand() % (tt.width - 1);
156 int h = 1 + rand() % (tt.height - 1);
161 x = rand() % (2*tt.width) - tt.width;
162 y = rand() % (2*tt.height) - tt.height;
164 fill_rect(&t->out, tt.picture,
172 if (x >= tt.width || y >= tt.height)
175 if (x + w > tt.width)
176 w = tt.width - x;
177 if (y + h > tt.height)
178 h = tt.height - y;
182 pixman_fill(cells, tt.width, 32, x, y, w, h,
186 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
188 for (y = 0; y < tt.height; y++) {
189 for (x = 0; x < tt.width; x++) {
194 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
199 x, y, tt.width, tt.height);
203 cells[y*tt.width+x] & mask,
204 cells[y*tt.width+x],
214 test_target_destroy_render(&t->out, &tt);