The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ipc: Add support for get bounds rect function

authored by

Yu Li and committed by
Simon Zeni
143ff5a0 e8d3b875

+36
+13
src/xrt/ipc/client/ipc_client_compositor.c
··· 856 856 IPC_CHK_ALWAYS_RET(icc->ipc_c, xret, "ipc_call_compositor_request_display_refresh_rate"); 857 857 } 858 858 859 + static xrt_result_t 860 + ipc_compositor_get_reference_bounds_rect(struct xrt_compositor *xc, 861 + enum xrt_reference_space_type reference_space_type, 862 + struct xrt_vec2 *bounds) 863 + { 864 + struct ipc_client_compositor *icc = ipc_client_compositor(xc); 865 + xrt_result_t xret; 866 + 867 + xret = ipc_call_compositor_get_reference_bounds_rect(icc->ipc_c, reference_space_type, bounds); 868 + IPC_CHK_ALWAYS_RET(icc->ipc_c, xret, "ipc_call_compositor_get_reference_bounds_rect"); 869 + } 870 + 859 871 static void 860 872 ipc_compositor_destroy(struct xrt_compositor *xc) 861 873 { ··· 899 911 icc->base.base.get_display_refresh_rate = ipc_compositor_get_display_refresh_rate; 900 912 icc->base.base.request_display_refresh_rate = ipc_compositor_request_display_refresh_rate; 901 913 icc->base.base.set_performance_level = ipc_compositor_set_performance_level; 914 + icc->base.base.get_reference_bounds_rect = ipc_compositor_get_reference_bounds_rect; 902 915 903 916 // Using in wait frame. 904 917 os_precise_sleeper_init(&icc->sleeper);
+14
src/xrt/ipc/server/ipc_server_handler.c
··· 1186 1186 } 1187 1187 1188 1188 xrt_result_t 1189 + ipc_handle_compositor_get_reference_bounds_rect(volatile struct ipc_client_state *ics, 1190 + enum xrt_reference_space_type reference_space_type, 1191 + struct xrt_vec2 *bounds) 1192 + { 1193 + IPC_TRACE_MARKER(); 1194 + 1195 + if (ics->xc == NULL) { 1196 + return XRT_ERROR_IPC_SESSION_NOT_CREATED; 1197 + } 1198 + 1199 + return xrt_comp_get_reference_bounds_rect(ics->xc, reference_space_type, bounds); 1200 + } 1201 + 1202 + xrt_result_t 1189 1203 ipc_handle_system_get_clients(volatile struct ipc_client_state *_ics, struct ipc_client_list *list) 1190 1204 { 1191 1205 struct ipc_server *s = _ics->server;
+9
src/xrt/ipc/shared/proto.json
··· 244 244 ] 245 245 }, 246 246 247 + "compositor_get_reference_bounds_rect": { 248 + "in": [ 249 + {"name": "reference_space_type", "type": "enum xrt_reference_space_type"} 250 + ], 251 + "out": [ 252 + {"name": "bounds", "type": "struct xrt_vec2"} 253 + ] 254 + }, 255 + 247 256 "swapchain_get_properties": { 248 257 "in": [ 249 258 {"name": "info", "type": "struct xrt_swapchain_create_info"}