diff options
author | Christian König <[email protected]> | 2012-02-25 12:26:37 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-03-01 15:06:55 +0100 |
commit | c14c84f383309ee0fdf007c0d3e968c38f3af86e (patch) | |
tree | fbf5050c11df315d3f4728307e273e0f91e6f42c /src/gallium/state_trackers/xvmc | |
parent | 91ac681113b05f8fe4dff51c3b80f967ac05c867 (diff) |
vl: move dirty area handling into winsys abstraction
Fixing uninitialized areas in SwapBuffers mode.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xvmc')
-rw-r--r-- | src/gallium/state_trackers/xvmc/surface.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/xvmc/xvmc_private.h | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/xvmc/surface.c b/src/gallium/state_trackers/xvmc/surface.c index 8fc96072344..c6f6ef593b4 100644 --- a/src/gallium/state_trackers/xvmc/surface.c +++ b/src/gallium/state_trackers/xvmc/surface.c @@ -359,6 +359,7 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable, struct pipe_resource *tex; struct pipe_surface surf_templ, *surf; + struct u_rect *dirty_area; XVMC_MSG(XVMC_TRACE, "[XvMC] Displaying surface %p.\n", surface); @@ -380,6 +381,8 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable, compositor = &context_priv->compositor; tex = vl_screen_texture_from_drawable(context_priv->vscreen, drawable); + dirty_area = vl_screen_get_dirty_area(context_priv->vscreen); + memset(&surf_templ, 0, sizeof(surf_templ)); surf_templ.format = tex->format; surf_templ.usage = PIPE_BIND_RENDER_TARGET; @@ -427,7 +430,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, surf, &dst_rect, NULL, &context_priv->dirty_area); + vl_compositor_render(compositor, surf, &dst_rect, NULL, dirty_area); pipe->flush(pipe, &surface_priv->fence); diff --git a/src/gallium/state_trackers/xvmc/xvmc_private.h b/src/gallium/state_trackers/xvmc/xvmc_private.h index 8242be9aea8..4117f5bf689 100644 --- a/src/gallium/state_trackers/xvmc/xvmc_private.h +++ b/src/gallium/state_trackers/xvmc/xvmc_private.h @@ -35,7 +35,6 @@ #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" @@ -62,8 +61,6 @@ typedef struct unsigned short subpicture_max_width; unsigned short subpicture_max_height; - struct u_rect dirty_area; - } XvMCContextPrivate; typedef struct |