st/wgl: refactor framebuffer locking code
authorBrian Paul <brianp@vmware.com>
Fri, 20 May 2016 20:16:18 +0000 (14:16 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 30 Jun 2016 18:43:50 +0000 (12:43 -0600)
commit128feef40e81b320af59edc7a2fcf6b2ad8d2b8d
treea6ff237bb594b5833b1a7308b141d7741d30e769
parent25cccb5bec7145e054d1246be0dc386cebdcc58a
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 <jfonseca@vmware.com>
src/gallium/state_trackers/wgl/stw_context.c
src/gallium/state_trackers/wgl/stw_device.h
src/gallium/state_trackers/wgl/stw_framebuffer.c
src/gallium/state_trackers/wgl/stw_framebuffer.h