return TRUE;
}
+static uint32_t osmesa_fb_ID = 0;
static struct st_framebuffer_iface *
osmesa_create_st_framebuffer(void)
stfbi->flush_front = osmesa_st_framebuffer_flush_front;
stfbi->validate = osmesa_st_framebuffer_validate;
p_atomic_set(&stfbi->stamp, 1);
+ stfbi->ID = p_atomic_inc_return(&osmesa_fb_ID);
+ stfbi->state_manager = get_st_manager();
}
return stfbi;
}
static void
osmesa_destroy_buffer(struct osmesa_buffer *osbuffer)
{
+ struct st_api *stapi = get_st_api();
+
+ /*
+ * Notify the state manager that the associated framebuffer interface
+ * is no longer valid.
+ */
+ stapi->destroy_drawable(stapi, osbuffer->stfb);
+
FREE(osbuffer->stfb);
FREE(osbuffer);
}