Lines Matching defs: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);
106 fill_rect(&t->out, tt.draw, tt.format,
112 cells[y*tt.width+x] = fg;
115 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
122 XShmGetImage(t->out.dpy, tt.draw, &image,
127 cells[y*tt.width+x])) {
132 cells[y*tt.width+x] & mask,
133 cells[y*tt.width+x],
141 test_target_destroy_render(&t->out, &tt);
146 static void clear(struct test_display *dpy, struct test_target *tt)
149 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
150 0, 0, tt->width, tt->height);
155 struct test_target tt;
163 test_target_create_render(&t->out, target, &tt);
164 clear(&t->out, &tt);
166 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
170 int w = 1 + rand() % (tt.width - 1);
171 int h = 1 + rand() % (tt.height - 1);
174 x = rand() % (2*tt.width) - tt.width;
175 y = rand() % (2*tt.height) - tt.height;
177 fill_rect(&t->out, tt.draw, tt.format,
185 if (x >= tt.width || y >= tt.height)
188 if (x + w > tt.width)
189 w = tt.width - x;
190 if (y + h > tt.height)
191 h = tt.height - y;
195 pixman_fill(cells, tt.width, 32, x, y, w, h, fg);
198 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
200 for (y = 0; y < tt.height; y++) {
201 for (x = 0; x < tt.width; x++) {
206 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
211 x, y, tt.width, tt.height);
215 cells[y*tt.width+x] & mask,
216 cells[y*tt.width+x],
226 test_target_destroy_render(&t->out, &tt);