summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vega/path.c')
-rw-r--r--src/gallium/state_trackers/vega/path.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vega/path.c b/src/gallium/state_trackers/vega/path.c
index 62eb62418d3..06c96a35502 100644
--- a/src/gallium/state_trackers/vega/path.c
+++ b/src/gallium/state_trackers/vega/path.c
@@ -1532,6 +1532,7 @@ void path_render(struct path *p, VGbitfield paintModes,
struct matrix *mat)
{
struct vg_context *ctx = vg_current_context();
+ struct matrix paint_matrix;
vg_validate_state(ctx);
@@ -1543,19 +1544,29 @@ void path_render(struct path *p, VGbitfield paintModes,
mat->m[3], mat->m[4], mat->m[5],
mat->m[6], mat->m[7], mat->m[8]);
#endif
- if (paintModes & VG_FILL_PATH) {
+ if ((paintModes & VG_FILL_PATH) &&
+ vg_get_paint_matrix(ctx,
+ &ctx->state.vg.fill_paint_to_user_matrix,
+ mat,
+ &paint_matrix)) {
/* First the fill */
shader_set_paint(ctx->shader, ctx->state.vg.fill_paint);
+ shader_set_paint_matrix(ctx->shader, &paint_matrix);
shader_bind(ctx->shader);
path_fill(p, mat);
}
- if (paintModes & VG_STROKE_PATH){
+ if ((paintModes & VG_STROKE_PATH) &&
+ vg_get_paint_matrix(ctx,
+ &ctx->state.vg.stroke_paint_to_user_matrix,
+ mat,
+ &paint_matrix)) {
/* 8.7.5: "line width less than or equal to 0 prevents stroking from
* taking place."*/
if (ctx->state.vg.stroke.line_width.f <= 0)
return;
shader_set_paint(ctx->shader, ctx->state.vg.stroke_paint);
+ shader_set_paint_matrix(ctx->shader, &paint_matrix);
shader_bind(ctx->shader);
path_stroke(p, mat);
}