summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-27 15:28:13 +0200
committerChristian König <[email protected]>2011-04-27 15:28:13 +0200
commit221e1b7ababe67efe80f38f8ab2236be5cacfddf (patch)
tree36835243a1cb6b0bc302c36a4209d1e74cc724a3 /src
parent0d53cb2e83cafb7007068192674a8b5b57a27ca4 (diff)
[g3dvl] make reset_dirty_area a public interface
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c1
-rw-r--r--src/gallium/include/pipe/p_video_context.h5
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c16
3 files changed, 15 insertions, 7 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index f6f7b65fd6b..c13e69d53d1 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -713,6 +713,7 @@ vl_compositor_init(struct pipe_video_context *vpipe, struct pipe_context *pipe)
compositor->base.context = vpipe;
compositor->base.destroy = vl_compositor_destroy;
compositor->base.set_csc_matrix = vl_compositor_set_csc_matrix;
+ compositor->base.reset_dirty_area = vl_compositor_reset_dirty_area;
compositor->base.clear_layers = vl_compositor_clear_layers;
compositor->base.set_buffer_layer = vl_compositor_set_buffer_layer;
compositor->base.set_palette_layer = vl_compositor_set_palette_layer;
diff --git a/src/gallium/include/pipe/p_video_context.h b/src/gallium/include/pipe/p_video_context.h
index 41f2e320580..933b377a0c3 100644
--- a/src/gallium/include/pipe/p_video_context.h
+++ b/src/gallium/include/pipe/p_video_context.h
@@ -265,6 +265,11 @@ struct pipe_video_compositor
void (*set_csc_matrix)(struct pipe_video_compositor *compositor, const float mat[16]);
/**
+ * reset dirty area, so it's cleared with the clear colour
+ */
+ void (*reset_dirty_area)(struct pipe_video_compositor *compositor);
+
+ /**
* set overlay samplers
*/
/*@{*/
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index 7819fe0777b..da41a182164 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -500,20 +500,26 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
context = surface_priv->context;
context_priv = context->privData;
+ assert(flags == XVMC_TOP_FIELD || flags == XVMC_BOTTOM_FIELD || flags == XVMC_FRAME_PICTURE);
+ assert(srcx + srcw - 1 < surface->width);
+ assert(srcy + srch - 1 < surface->height);
+
+ subpicture_priv = surface_priv->subpicture ? surface_priv->subpicture->privData : NULL;
+ vpipe = context_priv->vctx->vpipe;
+ compositor = context_priv->compositor;
+
if (!context_priv->drawable_surface ||
context_priv->dst_rect.x != dst_rect.x || context_priv->dst_rect.y != dst_rect.y ||
context_priv->dst_rect.w != dst_rect.w || context_priv->dst_rect.h != dst_rect.h) {
context_priv->drawable_surface = vl_drawable_surface_get(context_priv->vctx, drawable);
context_priv->dst_rect = dst_rect;
+ compositor->reset_dirty_area(compositor);
}
if (!context_priv->drawable_surface)
return BadDrawable;
- assert(flags == XVMC_TOP_FIELD || flags == XVMC_BOTTOM_FIELD || flags == XVMC_FRAME_PICTURE);
- assert(srcx + srcw - 1 < surface->width);
- assert(srcy + srch - 1 < surface->height);
/*
* Some apps (mplayer) hit these asserts because they call
* this function after the window has been resized by the WM
@@ -526,10 +532,6 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
assert(desty + desth - 1 < drawable_surface->height);
*/
- subpicture_priv = surface_priv->subpicture ? surface_priv->subpicture->privData : NULL;
- vpipe = context_priv->vctx->vpipe;
- compositor = context_priv->compositor;
-
unmap_and_flush_surface(surface_priv);
compositor->clear_layers(compositor);