summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-05-31 17:16:26 -0700
committerJosé Fonseca <[email protected]>2009-05-31 17:16:26 -0700
commitea3ee4791eb8b9eefdd40b6ce9bbfc2dc86542bf (patch)
treee7d7494baf7d7c83013a447d89b5a56f91f091fc /src/gallium/state_trackers/wgl
parent0ea519f931a14e4dff6ef391803baba8bec84160 (diff)
wgl: Cleanup framebuffer destruction logic.
Diffstat (limited to 'src/gallium/state_trackers/wgl')
-rw-r--r--src/gallium/state_trackers/wgl/shared/stw_framebuffer.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
index 030a155f54a..768cef3db6c 100644
--- a/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/shared/stw_framebuffer.c
@@ -213,23 +213,18 @@ stw_framebuffer_resize(
static INLINE void
-stw_framebuffer_destroy(
+stw_framebuffer_destroy_locked(
struct stw_framebuffer *fb )
{
struct stw_framebuffer **link;
- pipe_mutex_lock( stw_dev->mutex );
-
link = &stw_dev->fb_head;
- while (link && *link != fb)
+ while (*link != fb)
link = &(*link)->next;
assert(*link);
- if (link)
- *link = fb->next;
+ *link = fb->next;
fb->next = NULL;
- pipe_mutex_unlock( stw_dev->mutex );
-
st_unreference_framebuffer(fb->stfb);
pipe_mutex_destroy( fb->mutex );
@@ -249,7 +244,7 @@ stw_framebuffer_cleanup( void )
fb = stw_dev->fb_head;
while (fb) {
next = fb->next;
- stw_framebuffer_destroy(fb);
+ stw_framebuffer_destroy_locked(fb);
fb = next;
}
stw_dev->fb_head = NULL;