Lines Matching defs:img
133 static int g2d_work(struct g2d_context *ctx, struct g2d_image *img,
158 x = rand() % img->width;
159 y = rand() % img->height;
161 if (x == (img->width - 1))
163 if (y == (img->height - 1))
166 w = rand() % (img->width - x);
167 h = rand() % (img->height - y);
172 img->color = rand();
177 ret = g2d_solid_fill(ctx, img, x, y, w, h);
219 struct g2d_image img = {0};
301 img.width = bufw;
302 img.height = bufh;
303 img.stride = bufw * 4;
304 img.color_mode = G2D_COLOR_FMT_ARGB8888 | G2D_ORDER_AXRGB;
305 img.buf_type = G2D_IMGBUF_GEM;
306 img.bo[0] = bo->handle;
313 ret = g2d_work(ctx, &img, njobs, iters);