Lines Matching defs:img
275 * @img: a pointer to the dst/src g2d_image structure.
278 static void g2d_add_base_addr(struct g2d_context *ctx, struct g2d_image *img,
284 if (img->buf_type == G2D_IMGBUF_USERPTR)
286 (unsigned long)&img->user_ptr[0]);
288 g2d_add_cmd(ctx, cmd, img->bo[0]);
438 * @img: a pointer to g2d_image structure including image and buffer
446 g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
457 g2d_add_cmd(ctx, DST_COLOR_MODE_REG, img->color_mode);
458 g2d_add_base_addr(ctx, img, g2d_dst);
459 g2d_add_cmd(ctx, DST_STRIDE_REG, img->stride);
461 if (x + w > img->width)
462 w = img->width - x;
463 if (y + h > img->height)
464 h = img->height - y;
474 g2d_add_cmd(ctx, SF_COLOR_REG, img->color);
572 * @img: a pointer to g2d_image structure providing
582 g2d_move(struct g2d_context *ctx, struct g2d_image *img,
594 if (src_x + img->width > w)
595 src_w = img->width - src_x;
596 if (src_y + img->height > h)
597 src_h = img->height - src_y;
601 if (dst_x + img->width > w)
602 dst_w = img->width - dst_x;
603 if (dst_y + img->height > h)
604 dst_h = img->height - dst_y;
620 g2d_add_cmd(ctx, DST_COLOR_MODE_REG, img->color_mode);
621 g2d_add_cmd(ctx, SRC_COLOR_MODE_REG, img->color_mode);
623 g2d_add_base_addr(ctx, img, g2d_dst);
624 g2d_add_base_addr(ctx, img, g2d_src);
626 g2d_add_cmd(ctx, DST_STRIDE_REG, img->stride);
627 g2d_add_cmd(ctx, SRC_STRIDE_REG, img->stride);