diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-11-24 15:51:46 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-12-01 11:23:52 +0800 |
commit | 34f466d4e6a720138c0846ab6233c32dc039fe58 (patch) | |
tree | 871682f84d8bb2b7d549193b6d6e1f60db9e7016 /src/gallium/state_trackers | |
parent | 165cb19abc4279839b0f5f53eb2feac60c2f415e (diff) |
st/vega: Make image_draw take a matrix.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/vega/api_images.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/image.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/image.h | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/vega/api_images.c b/src/gallium/state_trackers/vega/api_images.c index 23ab37513f..60f9db60e9 100644 --- a/src/gallium/state_trackers/vega/api_images.c +++ b/src/gallium/state_trackers/vega/api_images.c @@ -303,7 +303,8 @@ void vegaDrawImage(VGImage image) } vg_validate_state(ctx); - image_draw((struct vg_image*)image); + image_draw((struct vg_image*)image, + &ctx->state.vg.image_user_to_surface_matrix); } void vegaSetPixels(VGint dx, VGint dy, diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c index c5421f84cc..b1bda3ff54 100644 --- a/src/gallium/state_trackers/vega/image.c +++ b/src/gallium/state_trackers/vega/image.c @@ -520,14 +520,13 @@ void image_copy(struct vg_image *dst, VGint dx, VGint dy, src->sampler_view, src->x + sx, src->y + sy, width, height); } -void image_draw(struct vg_image *img) +void image_draw(struct vg_image *img, struct matrix *matrix) { struct vg_context *ctx = vg_current_context(); VGfloat x1, y1; VGfloat x2, y2; VGfloat x3, y3; VGfloat x4, y4; - struct matrix *matrix; x1 = 0; y1 = 0; @@ -538,8 +537,6 @@ void image_draw(struct vg_image *img) x4 = 0; y4 = img->height; - matrix = &ctx->state.vg.image_user_to_surface_matrix; - matrix_map_point(matrix, x1, y1, &x1, &y1); matrix_map_point(matrix, x2, y2, &x2, &y2); matrix_map_point(matrix, x3, y3, &x3, &y3); diff --git a/src/gallium/state_trackers/vega/image.h b/src/gallium/state_trackers/vega/image.h index a990c9c587..391c048594 100644 --- a/src/gallium/state_trackers/vega/image.h +++ b/src/gallium/state_trackers/vega/image.h @@ -79,7 +79,7 @@ void image_copy(struct vg_image *dst, VGint dx, VGint dy, VGint width, VGint height, VGboolean dither); -void image_draw(struct vg_image *img); +void image_draw(struct vg_image *img, struct matrix *matrix); void image_set_pixels(VGint dx, VGint dy, struct vg_image *src, VGint sx, VGint sy, |