VGubyte *dst = (VGubyte *)data;
VGint xoffset = 0, yoffset = 0;
- /* make sure rendering has completed */
- pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
if (sx < 0) {
xoffset = -sx;
xoffset *= _vega_size_for_format(dataFormat);
mask->sampler_view = view;
}
- vg_context_add_object(ctx, VG_OBJECT_MASK, mask);
+ vg_context_add_object(ctx, &mask->base);
return mask;
}
{
struct vg_context *ctx = vg_current_context();
- vg_context_remove_object(ctx, VG_OBJECT_MASK, layer);
+ vg_context_remove_object(ctx, &layer->base);
pipe_sampler_view_reference(&layer->sampler_view, NULL);
+ vg_free_object(&layer->base);
FREE(layer);
}
VGint width, VGint height,
VGfloat value)
{
- VGfloat alpha_color[4] = {0, 0, 0, 0};
-
- alpha_color[3] = value;
-
mask_resource_fill(layer->sampler_view->texture,
x, y, width, height, value);
}
struct pipe_surface *surf, surf_tmpl;
/* get the destination surface */
- u_surface_default_template(&surf_tmpl, layer->sampler_view->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, layer->sampler_view->texture);
surf = ctx->pipe->create_surface(ctx->pipe, layer->sampler_view->texture,
&surf_tmpl);
if (surf && renderer_copy_begin(ctx->renderer, surf, VG_FALSE, src)) {
struct pipe_sampler_view *view = vg_get_surface_mask(ctx);
struct matrix *mat = &ctx->state.vg.path_user_to_surface_matrix;
struct pipe_surface *surf, surf_tmpl;
- u_surface_default_template(&surf_tmpl, view->texture,
- PIPE_BIND_RENDER_TARGET);
+ u_surface_default_template(&surf_tmpl, view->texture);
surf = pipe->create_surface(pipe, view->texture, &surf_tmpl);
- renderer_validate_for_mask_rendering(ctx->renderer, surf);
+ renderer_validate_for_mask_rendering(ctx->renderer, surf, mat);
if (paint_modes & VG_FILL_PATH) {
- path_fill(path, mat);
+ path_fill(path);
}
if (paint_modes & VG_STROKE_PATH){
- path_stroke(path, mat);
+ path_stroke(path);
}
pipe_surface_reference(&surf, NULL);