mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
ipc: Add support for get bounds rect function
This commit is contained in:
parent
e8d3b875f0
commit
143ff5a0ac
|
@ -856,6 +856,18 @@ ipc_compositor_request_display_refresh_rate(struct xrt_compositor *xc, float dis
|
|||
IPC_CHK_ALWAYS_RET(icc->ipc_c, xret, "ipc_call_compositor_request_display_refresh_rate");
|
||||
}
|
||||
|
||||
static xrt_result_t
|
||||
ipc_compositor_get_reference_bounds_rect(struct xrt_compositor *xc,
|
||||
enum xrt_reference_space_type reference_space_type,
|
||||
struct xrt_vec2 *bounds)
|
||||
{
|
||||
struct ipc_client_compositor *icc = ipc_client_compositor(xc);
|
||||
xrt_result_t xret;
|
||||
|
||||
xret = ipc_call_compositor_get_reference_bounds_rect(icc->ipc_c, reference_space_type, bounds);
|
||||
IPC_CHK_ALWAYS_RET(icc->ipc_c, xret, "ipc_call_compositor_get_reference_bounds_rect");
|
||||
}
|
||||
|
||||
static void
|
||||
ipc_compositor_destroy(struct xrt_compositor *xc)
|
||||
{
|
||||
|
@ -899,6 +911,7 @@ ipc_compositor_init(struct ipc_client_compositor *icc, struct xrt_compositor_nat
|
|||
icc->base.base.get_display_refresh_rate = ipc_compositor_get_display_refresh_rate;
|
||||
icc->base.base.request_display_refresh_rate = ipc_compositor_request_display_refresh_rate;
|
||||
icc->base.base.set_performance_level = ipc_compositor_set_performance_level;
|
||||
icc->base.base.get_reference_bounds_rect = ipc_compositor_get_reference_bounds_rect;
|
||||
|
||||
// Using in wait frame.
|
||||
os_precise_sleeper_init(&icc->sleeper);
|
||||
|
|
|
@ -1185,6 +1185,20 @@ ipc_handle_compositor_set_thread_hint(volatile struct ipc_client_state *ics,
|
|||
return xrt_comp_set_thread_hint(ics->xc, hint, thread_id);
|
||||
}
|
||||
|
||||
xrt_result_t
|
||||
ipc_handle_compositor_get_reference_bounds_rect(volatile struct ipc_client_state *ics,
|
||||
enum xrt_reference_space_type reference_space_type,
|
||||
struct xrt_vec2 *bounds)
|
||||
{
|
||||
IPC_TRACE_MARKER();
|
||||
|
||||
if (ics->xc == NULL) {
|
||||
return XRT_ERROR_IPC_SESSION_NOT_CREATED;
|
||||
}
|
||||
|
||||
return xrt_comp_get_reference_bounds_rect(ics->xc, reference_space_type, bounds);
|
||||
}
|
||||
|
||||
xrt_result_t
|
||||
ipc_handle_system_get_clients(volatile struct ipc_client_state *_ics, struct ipc_client_list *list)
|
||||
{
|
||||
|
|
|
@ -244,6 +244,15 @@
|
|||
]
|
||||
},
|
||||
|
||||
"compositor_get_reference_bounds_rect": {
|
||||
"in": [
|
||||
{"name": "reference_space_type", "type": "enum xrt_reference_space_type"}
|
||||
],
|
||||
"out": [
|
||||
{"name": "bounds", "type": "struct xrt_vec2"}
|
||||
]
|
||||
},
|
||||
|
||||
"swapchain_get_properties": {
|
||||
"in": [
|
||||
{"name": "info", "type": "struct xrt_swapchain_create_info"}
|
||||
|
|
Loading…
Reference in a new issue