diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-10-15 15:57:55 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2010-10-15 19:13:00 +0100 |
commit | 44207ff71b3d53b30cf6c3e52c84ddc5cd44b424 (patch) | |
tree | 82e914af9613b3d38b3d827bdacf1a6dbbf88e0e /src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | |
parent | f8f3baa43a3954b7078e5e24b41ae123f398bff8 (diff) |
wrapper: Add a way to dewrap a pipe screen without destroying it
Diffstat (limited to 'src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c')
-rw-r--r-- | src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c index 38cf29e605..bc2623e7b7 100644 --- a/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c +++ b/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c @@ -304,3 +304,16 @@ err_free: err: return NULL; } + +struct pipe_screen * +wrapper_sw_winsys_dewrap_pipe_screen(struct sw_winsys *ws) +{ + struct wrapper_sw_winsys *wsw = wrapper_sw_winsys(ws); + struct pipe_screen *screen = wsw->screen; + + wsw->pipe->destroy(wsw->pipe); + /* don't destroy the screen its needed later on */ + + FREE(wsw); + return screen; +} |