diff options
-rw-r--r-- | src/gallium/state_trackers/vega/api_path.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/mask.c | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/path.c | 9 | ||||
-rw-r--r-- | src/gallium/state_trackers/vega/path.h | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/vega/api_path.c b/src/gallium/state_trackers/vega/api_path.c index f76adddb58..fe57b7671d 100644 --- a/src/gallium/state_trackers/vega/api_path.c +++ b/src/gallium/state_trackers/vega/api_path.c @@ -479,6 +479,7 @@ void vegaDrawPath(VGPath path, VGbitfield paintModes) if (path_is_empty((struct path*)path)) return; - path_render((struct path*)path, paintModes); + path_render((struct path*)path, paintModes, + &ctx->state.vg.path_user_to_surface_matrix); } diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c index ce81280dd0..e8a017d9c4 100644 --- a/src/gallium/state_trackers/vega/mask.c +++ b/src/gallium/state_trackers/vega/mask.c @@ -424,6 +424,7 @@ static void mask_layer_render_to(struct vg_mask_layer *layer, struct vg_context *ctx = vg_current_context(); const VGfloat fill_color[4] = {1.f, 1.f, 1.f, 1.f}; struct pipe_screen *screen = ctx->pipe->screen; + struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix; struct pipe_surface *surface; surface = screen->get_tex_surface(screen, layer->sampler_view->texture, 0, 0, 0, @@ -437,12 +438,11 @@ static void mask_layer_render_to(struct vg_mask_layer *layer, setup_mask_framebuffer(surface, layer->width, layer->height); if (paint_modes & VG_FILL_PATH) { - struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix; path_fill(path, mat); } if (paint_modes & VG_STROKE_PATH){ - path_stroke(path); + path_stroke(path, mat); } diff --git a/src/gallium/state_trackers/vega/path.c b/src/gallium/state_trackers/vega/path.c index 31c718e1c9..62eb62418d 100644 --- a/src/gallium/state_trackers/vega/path.c +++ b/src/gallium/state_trackers/vega/path.c @@ -1528,10 +1528,10 @@ struct path * path_create_stroke(struct path *p, return stroker.base.path; } -void path_render(struct path *p, VGbitfield paintModes) +void path_render(struct path *p, VGbitfield paintModes, + struct matrix *mat) { struct vg_context *ctx = vg_current_context(); - struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix; vg_validate_state(ctx); @@ -1557,7 +1557,7 @@ void path_render(struct path *p, VGbitfield paintModes) return; shader_set_paint(ctx->shader, ctx->state.vg.stroke_paint); shader_bind(ctx->shader); - path_stroke(p); + path_stroke(p, mat); } } @@ -1575,10 +1575,9 @@ void path_fill(struct path *p, struct matrix *mat) } } -void path_stroke(struct path *p) +void path_stroke(struct path *p, struct matrix *mat) { struct vg_context *ctx = vg_current_context(); - struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix; VGFillRule old_fill = ctx->state.vg.fill_rule; struct matrix identity; struct path *stroke; diff --git a/src/gallium/state_trackers/vega/path.h b/src/gallium/state_trackers/vega/path.h index e34538b736..772ab2a0a5 100644 --- a/src/gallium/state_trackers/vega/path.h +++ b/src/gallium/state_trackers/vega/path.h @@ -104,9 +104,9 @@ VGboolean path_interpolate(struct path *dst, VGfloat amount); void path_clear(struct path *p, VGbitfield capabilities); -void path_render(struct path *p, VGbitfield paintModes); +void path_render(struct path *p, VGbitfield paintModes, struct matrix *mat); void path_fill(struct path *p, struct matrix *mat); -void path_stroke(struct path *p); +void path_stroke(struct path *p, struct matrix *mat); void path_move_to(struct path *p, float x, float y); void path_line_to(struct path *p, float x, float y); |