For consistency and to simplify these objects' destruction.
static void
cell_destroy_screen( struct pipe_screen *screen )
{
+ struct pipe_winsys *winsys = screen->winsys;
+
+ if(winsys->destroy)
+ winsys->destroy(winsys);
+
FREE(screen);
}
struct i915_context *i915 = i915_context( pipe );
draw_destroy( i915->draw );
+
+ if(i915->winsys)
+ i915->winsys->destroy(i915->winsys);
FREE( i915 );
}
static void
i915_destroy_screen( struct pipe_screen *screen )
{
+ struct pipe_winsys *winsys = screen->winsys;
+
+ if(winsys->destroy)
+ winsys->destroy(winsys);
+
FREE(screen);
}
*/
struct i915_winsys {
+ void (*destroy)( struct i915_winsys *sws );
+
/**
* Get the current batch buffer from the winsys.
*/
{
struct brw_context *brw = brw_context(pipe);
+ if(brw->winsys->destroy)
+ brw->winsys->destroy(brw->winsys);
+
FREE(brw);
}
static void
brw_destroy_screen( struct pipe_screen *screen )
{
+ struct pipe_winsys *winsys = screen->winsys;
+
+ if(winsys->destroy)
+ winsys->destroy(winsys);
+
FREE(screen);
}
*/
struct brw_winsys {
+ void (*destroy)(struct brw_winsys *);
+
/**
* Reserve space on batch buffer.
*
static void
softpipe_destroy_screen( struct pipe_screen *screen )
{
+ struct pipe_winsys *winsys = screen->winsys;
+
+ if(winsys->destroy)
+ winsys->destroy(winsys);
+
FREE(screen);
}
*/
struct pipe_winsys
{
+ void (*destroy)( struct pipe_winsys *ws );
+
/** Returns name of this winsys interface */
const char *(*get_name)( struct pipe_winsys *ws );