summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-12-12 15:27:34 +0100
committerChristian König <[email protected]>2011-12-14 14:19:41 +0100
commit167b1b32c5ff30d514253072ce54513112c03d4d (patch)
tree2b49f67962ec5afc5050834f87b8fe08197cab5d /src/gallium/state_trackers
parent606d3a3c3de94665e47df47b48596293d588a420 (diff)
g3dvl/compositor: improve dirty area handling
Take viewport and scissors into account and make the dirty area a parameter instead of a member. Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/mixer.c2
-rw-r--r--src/gallium/state_trackers/vdpau/output.c2
-rw-r--r--src/gallium/state_trackers/vdpau/presentation.c4
-rw-r--r--src/gallium/state_trackers/vdpau/vdpau_private.h2
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/surface.c4
-rw-r--r--src/gallium/state_trackers/xorg/xvmc/xvmc_private.h2
6 files changed, 11 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index ed5a6464088..5657e7c83b0 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -173,7 +173,7 @@ VdpStatus vlVdpVideoMixerRender(VdpVideoMixer mixer,
vl_compositor_clear_layers(&vmixer->compositor);
vl_compositor_set_buffer_layer(&vmixer->compositor, 0, surf->video_buffer,
RectToPipe(video_source_rect, &src_rect), NULL);
- vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL, false);
+ vl_compositor_render(&vmixer->compositor, dst->surface, NULL, NULL, NULL);
return VDP_STATUS_OK;
}
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 0d2f35a433c..d83831e5dd2 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -312,7 +312,7 @@ vlVdpOutputSurfacePutBitsIndexed(VdpOutputSurface surface,
vl_compositor_clear_layers(compositor);
vl_compositor_set_palette_layer(compositor, 0, sv_idx, sv_tbl, NULL, NULL, false);
vl_compositor_render(compositor, vlsurface->surface,
- RectToPipe(destination_rect, &dst_rect), NULL, false);
+ RectToPipe(destination_rect, &dst_rect), NULL, NULL);
pipe_sampler_view_reference(&sv_idx, NULL);
pipe_sampler_view_reference(&sv_tbl, NULL);
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 888cf31d5af..df38f637de9 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -75,6 +75,8 @@ vlVdpPresentationQueueCreate(VdpDevice device,
goto no_compositor;
}
+ vl_compositor_reset_dirty_area(&pq->dirty_area);
+
*presentation_queue = vlAddDataHTAB(pq);
if (*presentation_queue == 0) {
ret = VDP_STATUS_ERROR;
@@ -234,7 +236,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
vl_compositor_clear_layers(&pq->compositor);
vl_compositor_set_rgba_layer(&pq->compositor, 0, surf->sampler_view, NULL, NULL);
- vl_compositor_render(&pq->compositor, drawable_surface, NULL, &vo_rect, true);
+ vl_compositor_render(&pq->compositor, drawable_surface, NULL, &vo_rect, &pq->dirty_area);
pipe = pq->device->context->pipe;
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h
index aae6f7841a6..eba9e2f2d37 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -37,6 +37,7 @@
#include "pipe/p_video_decoder.h"
#include "util/u_debug.h"
+#include "util/u_rect.h"
#include "vl/vl_compositor.h"
#include "vl_winsys.h"
@@ -298,6 +299,7 @@ typedef struct
vlVdpDevice *device;
Drawable drawable;
struct vl_compositor compositor;
+ struct u_rect dirty_area;
} vlVdpPresentationQueue;
typedef struct
diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c
index e6c5a898b05..bb7ba1e1ed2 100644
--- a/src/gallium/state_trackers/xorg/xvmc/surface.c
+++ b/src/gallium/state_trackers/xorg/xvmc/surface.c
@@ -381,7 +381,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
pipe_surface_reference(&context_priv->drawable_surface, NULL);
context_priv->drawable_surface = vl_drawable_surface_get(context_priv->vctx, drawable);
context_priv->dst_rect = dst_rect;
- vl_compositor_reset_dirty_area(compositor);
+ vl_compositor_reset_dirty_area(&context_priv->dirty_area);
}
if (!context_priv->drawable_surface)
@@ -425,7 +425,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
// Workaround for r600g, there seems to be a bug in the fence refcounting code
pipe->screen->fence_reference(pipe->screen, &surface_priv->fence, NULL);
- vl_compositor_render(compositor, context_priv->drawable_surface, &dst_rect, NULL, true);
+ vl_compositor_render(compositor, context_priv->drawable_surface, &dst_rect, NULL, &context_priv->dirty_area);
pipe->flush(pipe, &surface_priv->fence);
diff --git a/src/gallium/state_trackers/xorg/xvmc/xvmc_private.h b/src/gallium/state_trackers/xorg/xvmc/xvmc_private.h
index 305e51fb416..5656c65dc59 100644
--- a/src/gallium/state_trackers/xorg/xvmc/xvmc_private.h
+++ b/src/gallium/state_trackers/xorg/xvmc/xvmc_private.h
@@ -35,6 +35,7 @@
#include "util/u_debug.h"
#include "util/u_math.h"
+#include "util/u_rect.h"
#include "vl/vl_csc.h"
#include "vl/vl_compositor.h"
@@ -64,6 +65,7 @@ typedef struct
struct pipe_video_rect dst_rect;
struct pipe_surface *drawable_surface;
+ struct u_rect dirty_area;
} XvMCContextPrivate;