comp/client: Decrease visibility of downcast helpers.

This commit is contained in:
Ryan Pavlik 2020-06-03 16:26:34 -05:00
parent d0468a7697
commit 4ee0ad7767
6 changed files with 43 additions and 42 deletions

View file

@ -19,6 +19,16 @@
#include <inttypes.h>
/*!
* Down-cast helper.
* @private @memberof client_gl_swapchain
*/
static inline struct client_gl_swapchain *
client_gl_swapchain(struct xrt_swapchain *xsc)
{
return (struct client_gl_swapchain *)xsc;
}
/*
*
* Swapchain functions.

View file

@ -61,19 +61,10 @@ struct client_gl_compositor
*
*/
/*!
* Down-cast helper.
* @private @memberof client_gl_swapchain
*/
static inline struct client_gl_swapchain *
client_gl_swapchain(struct xrt_swapchain *xsc)
{
return (struct client_gl_swapchain *)xsc;
}
/*!
* Down-cast helper.
* @private @memberof client_gl_compositor
* @protected @memberof client_gl_compositor
*/
static inline struct client_gl_compositor *
client_gl_compositor(struct xrt_compositor *xc)

View file

@ -17,6 +17,17 @@
#include "client/comp_gl_xlib_client.h"
/*!
* Down-cast helper.
*
* @private @memberof client_gl_xlib_compositor
*/
static inline struct client_gl_xlib_compositor *
client_gl_xlib_compositor(struct xrt_compositor *xc)
{
return (struct client_gl_xlib_compositor *)xc;
}
static void
client_gl_xlib_compositor_destroy(struct xrt_compositor *xc)
{

View file

@ -30,17 +30,6 @@ struct client_gl_xlib_compositor
struct client_gl_compositor base;
};
/*!
* Down-cast helper.
*
* @private @memberof client_gl_xlib_compositor
*/
static inline struct client_gl_xlib_compositor *
client_gl_xlib_compositor(struct xrt_compositor *xc)
{
return (struct client_gl_xlib_compositor *)xc;
}
/*!
* Create a new client_gl_xlib_compositor.
*

View file

@ -15,6 +15,27 @@
#include "comp_vk_client.h"
/*!
* Down-cast helper.
*
* @private @memberof client_vk_swapchain
*/
static inline struct client_vk_swapchain *
client_vk_swapchain(struct xrt_swapchain *xsc)
{
return (struct client_vk_swapchain *)xsc;
}
/*!
* Down-cast helper.
*
* @private @memberof client_vk_compositor
*/
static inline struct client_vk_compositor *
client_vk_compositor(struct xrt_compositor *xc)
{
return (struct client_vk_compositor *)xc;
}
/*
*

View file

@ -70,27 +70,6 @@ struct client_vk_compositor
*
*/
/*!
* Down-cast helper.
*
* @private @memberof client_vk_swapchain
*/
static inline struct client_vk_swapchain *
client_vk_swapchain(struct xrt_swapchain *xsc)
{
return (struct client_vk_swapchain *)xsc;
}
/*!
* Down-cast helper.
*
* @private @memberof client_vk_compositor
*/
static inline struct client_vk_compositor *
client_vk_compositor(struct xrt_compositor *xc)
{
return (struct client_vk_compositor *)xc;
}
/*!
* Create a new client_vk_compositor.