summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/image.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-12-03 00:44:43 +0800
committerChia-I Wu <[email protected]>2010-12-03 14:23:04 +0800
commita84a1e344f544ec4da61809d4f09853a94d93e07 (patch)
treed1d141510e4a3b64c58e7596b2127749b320a067 /src/gallium/state_trackers/vega/image.c
parent29bea39fde0b3be89a34bf0d979f33f601412eee (diff)
st/vega: Move vertex transformation to shader.
It was done in path-to-polygon conversion. That meant that the results were invalidated when the transformation was modified, and CPU had to recreate the vertex buffer with new vertices. It could be a performance hit for apps that animate.
Diffstat (limited to 'src/gallium/state_trackers/vega/image.c')
-rw-r--r--src/gallium/state_trackers/vega/image.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 164af30ef3b..318ea94bdfb 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -546,11 +546,7 @@ void image_draw(struct vg_image *img, struct matrix *matrix)
x4 = 0;
y4 = img->height;
- matrix_map_point(matrix, x1, y1, &x1, &y1);
- matrix_map_point(matrix, x2, y2, &x2, &y2);
- matrix_map_point(matrix, x3, y3, &x3, &y3);
- matrix_map_point(matrix, x4, y4, &x4, &y4);
-
+ shader_set_surface_matrix(ctx->shader, matrix);
shader_set_drawing_image(ctx->shader, VG_TRUE);
shader_set_paint(ctx->shader, ctx->state.vg.fill_paint);
shader_set_paint_matrix(ctx->shader, &paint_matrix);