diff options
author | Brian Paul <[email protected]> | 2016-05-20 14:16:18 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-06-30 12:43:50 -0600 |
commit | 128feef40e81b320af59edc7a2fcf6b2ad8d2b8d (patch) | |
tree | a6ff237bb594b5833b1a7308b141d7741d30e769 /src/gallium/state_trackers/wgl/stw_device.h | |
parent | 25cccb5bec7145e054d1246be0dc386cebdcc58a (diff) |
st/wgl: refactor framebuffer locking code
Split the old stw_framebuffer_reference() function into two new
functions: stw_framebuffer_reference_locked() which increments
the refcount and stw_framebuffer_release_locked() which decrements
the refcount and destroys the buffer when the count hits zero.
Original patch by Jose. Modified by Brian (clean-ups, lock assertion
checks, etc).
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/wgl/stw_device.h')
-rw-r--r-- | src/gallium/state_trackers/wgl/stw_device.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_device.h b/src/gallium/state_trackers/wgl/stw_device.h index 3f0dffe408b..15d66a24e5d 100644 --- a/src/gallium/state_trackers/wgl/stw_device.h +++ b/src/gallium/state_trackers/wgl/stw_device.h @@ -67,6 +67,10 @@ struct stw_device CRITICAL_SECTION ctx_mutex; struct handle_table *ctx_table; + /* TODO: use an atomic counter to track the number of locked + * stw_framebuffer objects. Assert that the counter is zero when + * trying to lock this mutex. + */ CRITICAL_SECTION fb_mutex; struct stw_framebuffer *fb_head; |