Lines Matching refs:tt
35 struct test_target tt;
43 test_target_create_render(&t->out, target, &tt);
51 int x = rand() % (tt.width - 1);
52 int y = rand() % (tt.height - 1);
58 fill_rect(&t->out, tt.picture, PictOpSrc,
64 cells[y*tt.width+x] = color(red, green, blue, alpha);
67 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
74 XShmGetImage(t->out.dpy, tt.draw, &image,
79 cells[y*tt.width+x])) {
88 cells[y*tt.width+x] & mask,
89 cells[y*tt.width+x],
96 test_target_destroy_render(&t->out, &tt);
101 static void clear(struct test_display *dpy, struct test_target *tt)
104 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
105 0, 0, tt->width, tt->height);
110 struct test_target tt;
118 test_target_create_render(&t->out, target, &tt);
119 clear(&t->out, &tt);
121 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
125 int w = rand() % tt.width;
126 int h = rand() % tt.height;
132 x = rand() % (2*tt.width) - tt.width;
133 y = rand() % (2*tt.height) - tt.height;
135 fill_rect(&t->out, tt.picture, PictOpSrc,
142 if (x >= tt.width || y >= tt.height)
145 if (x + w > tt.width)
146 w = tt.width - x;
147 if (y + h > tt.height)
148 h = tt.height - y;
152 pixman_fill(cells, tt.width, 32, x, y, w, h,
156 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
158 for (y = 0; y < tt.height; y++) {
159 for (x = 0; x < tt.width; x++) {
164 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
172 cells[y*tt.width+x] & mask,
173 cells[y*tt.width+x],
182 test_target_destroy_render(&t->out, &tt);