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/winsys/g3dvl/xlib | |
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/winsys/g3dvl/xlib')
-rw-r--r-- | src/gallium/winsys/g3dvl/xlib/xsp_winsys.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c index 6cd16bf4647..a4f5326d8c0 100644 --- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c +++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c @@ -34,6 +34,7 @@ #include "state_tracker/xlib_sw_winsys.h" #include "softpipe/sp_public.h" +#include "vl/vl_compositor.h" #include "vl_winsys.h" struct vl_xsp_screen @@ -44,6 +45,7 @@ struct vl_xsp_screen Visual visual; struct xlib_drawable xdraw; struct pipe_resource *tex; + struct u_rect dirty_area; }; struct pipe_resource* @@ -68,8 +70,8 @@ vl_screen_texture_from_drawable(struct vl_screen *vscreen, Drawable drawable) if (xsp_screen->tex) { if (xsp_screen->tex->width0 == width && xsp_screen->tex->height0 == height) return xsp_screen->tex; - else - pipe_resource_reference(&xsp_screen->tex, NULL); + pipe_resource_reference(&xsp_screen->tex, NULL); + vl_compositor_reset_dirty_area(&xsp_screen->dirty_area); } memset(&templat, 0, sizeof(struct pipe_resource)); @@ -91,6 +93,13 @@ vl_screen_texture_from_drawable(struct vl_screen *vscreen, Drawable drawable) return xsp_screen->tex; } +struct u_rect * +vl_screen_get_dirty_area(struct vl_screen *vscreen) +{ + struct vl_xsp_screen *xsp_screen = (struct vl_xsp_screen*)vscreen; + return &xsp_screen->dirty_area; +} + void* vl_screen_get_private(struct vl_screen *vscreen) { @@ -126,6 +135,7 @@ vl_screen_create(Display *display, int screen) xsp_screen->display = display; xsp_screen->screen = screen; xsp_screen->xdraw.visual = XDefaultVisual(display, screen); + vl_compositor_reset_dirty_area(&xsp_screen->dirty_area); return &xsp_screen->base; } |