summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vega/image.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-11-28 19:45:17 +0800
committerChia-I Wu <[email protected]>2010-12-01 11:23:51 +0800
commit20ce148c305200c760f34d2098d92bc77cb6deee (patch)
tree91befa05712556e3ef58d5b4b30bc19cf208b2f6 /src/gallium/state_trackers/vega/image.c
parent33ca973e7a6036566aa7363681419a58a30ab0f3 (diff)
st/vega: Get rid of renderer_copy_texture.
Diffstat (limited to 'src/gallium/state_trackers/vega/image.c')
-rw-r--r--src/gallium/state_trackers/vega/image.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/vega/image.c b/src/gallium/state_trackers/vega/image.c
index 88705d093ea..303e979012a 100644
--- a/src/gallium/state_trackers/vega/image.c
+++ b/src/gallium/state_trackers/vega/image.c
@@ -135,19 +135,20 @@ static void vg_copy_texture(struct vg_context *ctx,
if (src_loc[2] >= 0 && src_loc[3] >= 0 &&
dst_loc[2] >= 0 && dst_loc[3] >= 0) {
- renderer_copy_texture(ctx->renderer,
- src,
- src_loc[0],
- src_loc[1] + src_loc[3],
- src_loc[0] + src_loc[2],
- src_loc[1],
- dst,
- dst_loc[0],
- dst_loc[1] + dst_loc[3],
- dst_loc[0] + dst_loc[2],
- dst_loc[1]);
- }
+ struct pipe_surface *surf;
+
+ /* get the destination surface */
+ surf = ctx->pipe->screen->get_tex_surface(ctx->pipe->screen,
+ dst, 0, 0, 0, PIPE_BIND_RENDER_TARGET);
+ if (surf && renderer_copy_begin(ctx->renderer, surf, VG_TRUE, src)) {
+ renderer_copy(ctx->renderer,
+ dst_loc[0], dst_loc[1], dst_loc[2], dst_loc[3],
+ src_loc[0], src_loc[1], src_loc[2], src_loc[3]);
+ renderer_copy_end(ctx->renderer);
+ }
+ pipe_surface_reference(&surf, NULL);
+ }
}
void vg_copy_surface(struct vg_context *ctx,