summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_trace.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2009-01-17 17:12:30 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2009-01-17 17:12:30 +0000
commitbcc45a202496fba9686f953011039c09e36bf3ae (patch)
treea8cab6caab4fac57ac04b683a2fd4d3c66ddd429 /src/gallium/winsys/xlib/xlib_trace.c
parent4f134f91a427b053d1bc069cb6cac48a0982abc3 (diff)
xlib: don't explicitly create the pipe_winsys struct
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_trace.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_trace.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/winsys/xlib/xlib_trace.c b/src/gallium/winsys/xlib/xlib_trace.c
index 1b8d3f8a11..37095c5d8e 100644
--- a/src/gallium/winsys/xlib/xlib_trace.c
+++ b/src/gallium/winsys/xlib/xlib_trace.c
@@ -38,19 +38,16 @@
#include "trace/tr_screen.h"
#include "trace/tr_context.h"
+#include "pipe/p_screen.h"
+
-static struct pipe_winsys *
-xlib_create_trace_winsys( void )
-{
- return xlib_softpipe_driver.create_pipe_winsys();
-}
static struct pipe_screen *
-xlib_create_trace_screen( struct pipe_winsys *winsys )
+xlib_create_trace_screen( void )
{
struct pipe_screen *screen, *trace_screen;
- screen = xlib_softpipe_driver.create_pipe_screen( winsys );
+ screen = xlib_softpipe_driver.create_pipe_screen();
if (screen == NULL)
goto fail;
@@ -63,7 +60,8 @@ xlib_create_trace_screen( struct pipe_winsys *winsys )
return trace_screen;
fail:
- /* free stuff */
+ if (screen)
+ screen->destroy( screen );
return NULL;
}
@@ -103,7 +101,6 @@ xlib_trace_display_surface( struct xmesa_buffer *buffer,
struct xm_driver xlib_trace_driver =
{
- .create_pipe_winsys = xlib_create_trace_winsys,
.create_pipe_screen = xlib_create_trace_screen,
.create_pipe_context = xlib_create_trace_context,
.display_surface = xlib_trace_display_surface,