Lines Matching refs:tt
32 struct test_target tt;
40 test_target_create_render(&t->out, target, &tt);
48 int x = rand() % (tt.width - 1);
49 int y = rand() % (tt.height - 1);
55 fill_rect(&t->out, tt.picture, PictOpSrc,
61 cells[y*tt.width+x] = color(red, green, blue, alpha);
64 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
71 XShmGetImage(t->out.dpy, tt.draw, &image,
76 cells[y*tt.width+x])) {
80 cells[y*tt.width+x] & mask,
81 cells[y*tt.width+x],
88 test_target_destroy_render(&t->out, &tt);
93 static void clear(struct test_display *dpy, struct test_target *tt)
96 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
97 0, 0, tt->width, tt->height);
102 struct test_target tt;
110 test_target_create_render(&t->out, target, &tt);
111 clear(&t->out, &tt);
113 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
117 int w = rand() % tt.width;
118 int h = rand() % tt.height;
124 x = rand() % (2*tt.width) - tt.width;
125 y = rand() % (2*tt.height) - tt.height;
127 fill_rect(&t->out, tt.picture, PictOpSrc,
134 if (x >= tt.width || y >= tt.height)
137 if (x + w > tt.width)
138 w = tt.width - x;
139 if (y + h > tt.height)
140 h = tt.height - y;
144 pixman_fill(cells, tt.width, 32, x, y, w, h,
148 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
150 for (y = 0; y < tt.height; y++) {
151 for (x = 0; x < tt.width; x++) {
156 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
164 cells[y*tt.width+x] & mask,
165 cells[y*tt.width+x],
174 test_target_destroy_render(&t->out, &tt);