aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/wgl/stw_framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-11-10 14:24:18 -0700
committerBrian Paul <[email protected]>2015-11-12 11:21:25 -0700
commitfce68832c5e06a046b69fbad1e1424aaec6fc0b2 (patch)
tree0ecc4bd51ed79f01c023152354a52b31d84b6518 /src/gallium/state_trackers/wgl/stw_framebuffer.c
parentfa30de7643ca6c70ac2661684b22f7b220a40b0b (diff)
st/wgl: reimplement stw_device::fb_mutex with CRITICAL_SECTION
Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/wgl/stw_framebuffer.c')
-rw-r--r--src/gallium/state_trackers/wgl/stw_framebuffer.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index 09dede8d2a1..ce5b2c3e0b8 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -230,11 +230,11 @@ stw_call_window_proc(int nCode, WPARAM wParam, LPARAM lParam)
}
}
else if (pParams->message == WM_DESTROY) {
- pipe_mutex_lock( stw_dev->fb_mutex );
+ stw_lock_framebuffers(stw_dev);
fb = stw_framebuffer_from_hwnd_locked( pParams->hwnd );
if (fb)
stw_framebuffer_destroy_locked(fb);
- pipe_mutex_unlock( stw_dev->fb_mutex );
+ stw_unlock_framebuffers(stw_dev);
}
return CallNextHookEx(tls_data->hCallWndProcHook, nCode, wParam, lParam);
@@ -304,10 +304,10 @@ stw_framebuffer_create(HDC hdc, int iPixelFormat)
*/
pipe_mutex_lock( fb->mutex );
- pipe_mutex_lock( stw_dev->fb_mutex );
+ stw_lock_framebuffers(stw_dev);
fb->next = stw_dev->fb_head;
stw_dev->fb_head = fb;
- pipe_mutex_unlock( stw_dev->fb_mutex );
+ stw_unlock_framebuffers(stw_dev);
return fb;
}
@@ -328,12 +328,12 @@ stw_framebuffer_reference(struct stw_framebuffer **ptr,
if (fb)
fb->refcnt++;
if (old_fb) {
- pipe_mutex_lock(stw_dev->fb_mutex);
+ stw_lock_framebuffers(stw_dev);
pipe_mutex_lock(old_fb->mutex);
stw_framebuffer_destroy_locked(old_fb);
- pipe_mutex_unlock(stw_dev->fb_mutex);
+ stw_unlock_framebuffers(stw_dev);
}
*ptr = fb;
@@ -372,7 +372,7 @@ stw_framebuffer_cleanup(void)
if (!stw_dev)
return;
- pipe_mutex_lock( stw_dev->fb_mutex );
+ stw_lock_framebuffers(stw_dev);
fb = stw_dev->fb_head;
while (fb) {
@@ -385,7 +385,7 @@ stw_framebuffer_cleanup(void)
}
stw_dev->fb_head = NULL;
- pipe_mutex_unlock( stw_dev->fb_mutex );
+ stw_unlock_framebuffers(stw_dev);
}
@@ -419,9 +419,9 @@ stw_framebuffer_from_hdc(HDC hdc)
if (!stw_dev)
return NULL;
- pipe_mutex_lock( stw_dev->fb_mutex );
+ stw_lock_framebuffers(stw_dev);
fb = stw_framebuffer_from_hdc_locked(hdc);
- pipe_mutex_unlock( stw_dev->fb_mutex );
+ stw_unlock_framebuffers(stw_dev);
return fb;
}
@@ -436,9 +436,9 @@ stw_framebuffer_from_hwnd(HWND hwnd)
{
struct stw_framebuffer *fb;
- pipe_mutex_lock( stw_dev->fb_mutex );
+ stw_lock_framebuffers(stw_dev);
fb = stw_framebuffer_from_hwnd_locked(hwnd);
- pipe_mutex_unlock( stw_dev->fb_mutex );
+ stw_unlock_framebuffers(stw_dev);
return fb;
}