summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/xlib/xlib_cell.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_cell.c
parent4f134f91a427b053d1bc069cb6cac48a0982abc3 (diff)
xlib: don't explicitly create the pipe_winsys struct
Diffstat (limited to 'src/gallium/winsys/xlib/xlib_cell.c')
-rw-r--r--src/gallium/winsys/xlib/xlib_cell.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/winsys/xlib/xlib_cell.c b/src/gallium/winsys/xlib/xlib_cell.c
index 5fe406d5ab..93bc8ecd81 100644
--- a/src/gallium/winsys/xlib/xlib_cell.c
+++ b/src/gallium/winsys/xlib/xlib_cell.c
@@ -414,7 +414,24 @@ xlib_create_cell_winsys( void )
static struct pipe_screen *
xlib_create_cell_screen( struct pipe_winsys *pws )
{
- return cell_create_screen( pws );
+ struct pipe_winsys *winsys;
+ struct pipe_screen *screen;
+
+ winsys = xlib_create_cell_winsys();
+ if (winsys == NULL)
+ return NULL;
+
+ screen = cell_create_screen(winsys);
+ if (screen == NULL)
+ goto fail;
+
+ return screen;
+
+fail:
+ if (winsys)
+ winsys->destroy( winsys );
+
+ return NULL;
}
@@ -445,7 +462,6 @@ fail:
struct xm_driver xlib_cell_driver =
{
- .create_pipe_winsys = xlib_create_cell_winsys,
.create_pipe_screen = xlib_create_cell_screen,
.create_pipe_context = xlib_create_cell_context,
.display_surface = xlib_cell_display_surface,
@@ -455,7 +471,6 @@ struct xm_driver xlib_cell_driver =
struct xm_driver xlib_cell_driver =
{
- .create_pipe_winsys = NULL,
.create_pipe_screen = NULL,
.create_pipe_context = NULL,
.display_surface = NULL,