Lines Matching refs:tt
57 struct test_target tt;
65 test_target_create_render(&t->out, target, &tt);
73 int x = rand() % (tt.width - 1);
74 int y = rand() % (tt.height - 1);
77 fill_rect(&t->out, tt.draw, GXcopy,
82 cells[y*tt.width+x] = fg;
85 test_init_image(&image, &t->out.shm, tt.format, 1, 1);
92 XShmGetImage(t->out.dpy, tt.draw, &image,
97 cells[y*tt.width+x])) {
102 cells[y*tt.width+x] & mask,
103 cells[y*tt.width+x],
111 test_target_destroy_render(&t->out, &tt);
116 static void clear(struct test_display *dpy, struct test_target *tt)
119 XRenderFillRectangle(dpy->dpy, PictOpClear, tt->picture, &render_color,
120 0, 0, tt->width, tt->height);
125 struct test_target tt;
133 test_target_create_render(&t->out, target, &tt);
134 clear(&t->out, &tt);
136 test_init_image(&image, &t->out.shm, tt.format, tt.width, tt.height);
140 int w = rand() % tt.width;
141 int h = rand() % tt.height;
144 x = rand() % (2*tt.width) - tt.width;
145 y = rand() % (2*tt.height) - tt.height;
147 fill_rect(&t->out, tt.draw, GXcopy,
154 if (x >= tt.width || y >= tt.height)
157 if (x + w > tt.width)
158 w = tt.width - x;
159 if (y + h > tt.height)
160 h = tt.height - y;
164 pixman_fill(cells, tt.width, 32, x, y, w, h, fg);
167 XShmGetImage(t->out.dpy, tt.draw, &image, 0, 0, AllPlanes);
169 for (y = 0; y < tt.height; y++) {
170 for (x = 0; x < tt.width; x++) {
175 if (!pixel_equal(image.depth, result, cells[y*tt.width+x])) {
180 x, y, tt.width, tt.height);
184 cells[y*tt.width+x] & mask,
185 cells[y*tt.width+x],
195 test_target_destroy_render(&t->out, &tt);