summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/mask.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-11-28 19:45:17 +0800
committerChia-I Wu <olv@lunarg.com>2010-12-01 11:23:51 +0800
commit20ce148c305200c760f34d2098d92bc77cb6deee (patch)
tree91befa05712556e3ef58d5b4b30bc19cf208b2f6 /src/gallium/state_trackers/vega/mask.c
parent33ca973e7a6036566aa7363681419a58a30ab0f3 (diff)
st/vega: Get rid of renderer_copy_texture.
Diffstat (limited to 'src/gallium/state_trackers/vega/mask.c')
-rw-r--r--src/gallium/state_trackers/vega/mask.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/state_trackers/vega/mask.c b/src/gallium/state_trackers/vega/mask.c
index 3b042cec0e..e40df06347 100644
--- a/src/gallium/state_trackers/vega/mask.c
+++ b/src/gallium/state_trackers/vega/mask.c
@@ -399,16 +399,21 @@ void mask_copy(struct vg_mask_layer *layer,
VGint dx, VGint dy,
VGint width, VGint height)
{
- struct vg_context *ctx = vg_current_context();
- struct st_framebuffer *fb_buffers = ctx->draw_buffer;
-
- renderer_copy_texture(ctx->renderer,
- layer->sampler_view,
- sx, sy,
- sx + width, sy + height,
- fb_buffers->alpha_mask_view->texture,
- dx, dy,
- dx + width, dy + height);
+ struct vg_context *ctx = vg_current_context();
+ struct pipe_sampler_view *src = ctx->draw_buffer->alpha_mask_view;
+ struct pipe_surface *surf;
+
+ /* get the destination surface */
+ surf = ctx->pipe->screen->get_tex_surface(ctx->pipe->screen,
+ layer->sampler_view->texture, 0, 0, 0, PIPE_BIND_RENDER_TARGET);
+ if (surf && renderer_copy_begin(ctx->renderer, surf, VG_FALSE, src)) {
+ renderer_copy(ctx->renderer,
+ dx, dy, width, height,
+ sx, sy, width, height);
+ renderer_copy_end(ctx->renderer);
+ }
+
+ pipe_surface_reference(&surf, NULL);
}
static void mask_layer_render_to(struct vg_mask_layer *layer,