mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
wgl: Cleanup framebuffer destruction logic.
This commit is contained in:
parent
0ea519f931
commit
ea3ee4791e
1 changed files with 4 additions and 9 deletions
|
|
@ -213,23 +213,18 @@ stw_framebuffer_resize(
|
||||||
|
|
||||||
|
|
||||||
static INLINE void
|
static INLINE void
|
||||||
stw_framebuffer_destroy(
|
stw_framebuffer_destroy_locked(
|
||||||
struct stw_framebuffer *fb )
|
struct stw_framebuffer *fb )
|
||||||
{
|
{
|
||||||
struct stw_framebuffer **link;
|
struct stw_framebuffer **link;
|
||||||
|
|
||||||
pipe_mutex_lock( stw_dev->mutex );
|
|
||||||
|
|
||||||
link = &stw_dev->fb_head;
|
link = &stw_dev->fb_head;
|
||||||
while (link && *link != fb)
|
while (*link != fb)
|
||||||
link = &(*link)->next;
|
link = &(*link)->next;
|
||||||
assert(*link);
|
assert(*link);
|
||||||
if (link)
|
*link = fb->next;
|
||||||
*link = fb->next;
|
|
||||||
fb->next = NULL;
|
fb->next = NULL;
|
||||||
|
|
||||||
pipe_mutex_unlock( stw_dev->mutex );
|
|
||||||
|
|
||||||
st_unreference_framebuffer(fb->stfb);
|
st_unreference_framebuffer(fb->stfb);
|
||||||
|
|
||||||
pipe_mutex_destroy( fb->mutex );
|
pipe_mutex_destroy( fb->mutex );
|
||||||
|
|
@ -249,7 +244,7 @@ stw_framebuffer_cleanup( void )
|
||||||
fb = stw_dev->fb_head;
|
fb = stw_dev->fb_head;
|
||||||
while (fb) {
|
while (fb) {
|
||||||
next = fb->next;
|
next = fb->next;
|
||||||
stw_framebuffer_destroy(fb);
|
stw_framebuffer_destroy_locked(fb);
|
||||||
fb = next;
|
fb = next;
|
||||||
}
|
}
|
||||||
stw_dev->fb_head = NULL;
|
stw_dev->fb_head = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue