The open source OpenXR runtime
0
fork

Configure Feed

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

xrt: Add xrt_swapchain_create_properties and related function

+34
+34
src/xrt/include/xrt/xrt_compositor.h
··· 684 684 }; 685 685 686 686 /*! 687 + * Struct used to negotiate properties of a swapchain that is created outside 688 + * of the compositor. Often used by a client compositor or IPC layer to allocate 689 + * the swapchain images and then pass them into the native compositor. 690 + */ 691 + struct xrt_swapchain_create_properties 692 + { 693 + //! How many images the compositor want in the swapchain. 694 + uint32_t image_count; 695 + }; 696 + 697 + /*! 687 698 * Session information, mostly overlay extension data. 688 699 */ 689 700 struct xrt_session_info ··· 721 732 * Capabilities and recommended values information. 722 733 */ 723 734 struct xrt_compositor_info info; 735 + 736 + /*! 737 + * For a given @ref xrt_swapchain_create_info struct returns a filled 738 + * out @ref xrt_swapchain_create_properties. 739 + */ 740 + xrt_result_t (*get_swapchain_create_properties)(struct xrt_compositor *xc, 741 + const struct xrt_swapchain_create_info *info, 742 + struct xrt_swapchain_create_properties *xsccp); 724 743 725 744 /*! 726 745 * Create a swapchain with a set of images. ··· 1052 1071 */ 1053 1072 void (*destroy)(struct xrt_compositor *xc); 1054 1073 }; 1074 + 1075 + /*! 1076 + * @copydoc xrt_compositor::get_swapchain_create_properties 1077 + * 1078 + * Helper for calling through the function pointer. 1079 + * 1080 + * @public @memberof xrt_compositor 1081 + */ 1082 + static inline xrt_result_t 1083 + xrt_comp_get_swapchain_create_properties(struct xrt_compositor *xc, 1084 + const struct xrt_swapchain_create_info *info, 1085 + struct xrt_swapchain_create_properties *xsccp) 1086 + { 1087 + return xc->get_swapchain_create_properties(xc, info, xsccp); 1088 + } 1055 1089 1056 1090 /*! 1057 1091 * @copydoc xrt_compositor::create_swapchain