xrt: Rename output parameter of acquire_image to out_image.

As is tradition.
This commit is contained in:
Ryan Pavlik 2020-06-09 15:56:26 -05:00
parent 03f85fcd0a
commit 7446dc08d5
4 changed files with 14 additions and 9 deletions

View file

@ -56,12 +56,13 @@ client_gl_swapchain_destroy(struct xrt_swapchain *xsc)
}
static xrt_result_t
client_gl_swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *index)
client_gl_swapchain_acquire_image(struct xrt_swapchain *xsc,
uint32_t *out_index)
{
struct client_gl_swapchain *sc = client_gl_swapchain(xsc);
// Pipe down call into fd swapchain.
return xrt_swapchain_acquire_image(&sc->xscfd->base, index);
return xrt_swapchain_acquire_image(&sc->xscfd->base, out_index);
}
static xrt_result_t

View file

@ -71,12 +71,13 @@ client_vk_swapchain_destroy(struct xrt_swapchain *xsc)
}
static xrt_result_t
client_vk_swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *index)
client_vk_swapchain_acquire_image(struct xrt_swapchain *xsc,
uint32_t *out_index)
{
struct client_vk_swapchain *sc = client_vk_swapchain(xsc);
// Pipe down call into fd swapchain.
return xrt_swapchain_acquire_image(&sc->xscfd->base, index);
return xrt_swapchain_acquire_image(&sc->xscfd->base, out_index);
}
static xrt_result_t

View file

@ -27,14 +27,14 @@ swapchain_destroy(struct xrt_swapchain *xsc)
}
static xrt_result_t
swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *index)
swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *out_index)
{
struct comp_swapchain *sc = comp_swapchain(xsc);
COMP_SPEW(sc->c, "ACQUIRE_IMAGE");
// Returns negative on empty fifo.
int res = u_index_fifo_pop(&sc->fifo, index);
int res = u_index_fifo_pop(&sc->fifo, out_index);
if (res >= 0) {
return XRT_SUCCESS;
} else {

View file

@ -260,9 +260,12 @@ struct xrt_swapchain
*
* Caller must make sure that no image is acquired before calling
* acquire_image.
*
* @param xsc Self pointer
* @param[out] out_index Image index to use next
*/
xrt_result_t (*acquire_image)(struct xrt_swapchain *xsc,
uint32_t *index);
uint32_t *out_index);
/*!
* See xrWaitSwapchainImage, state tracker needs to track index.
@ -286,9 +289,9 @@ struct xrt_swapchain
* @public @memberof xrt_swapchain
*/
static inline xrt_result_t
xrt_swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *index)
xrt_swapchain_acquire_image(struct xrt_swapchain *xsc, uint32_t *out_index)
{
return xsc->acquire_image(xsc, index);
return xsc->acquire_image(xsc, out_index);
}
/*!