The open source OpenXR runtime
0
fork

Configure Feed

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

c/client: doc and naming convention improvements

+35 -28
+2 -2
src/xrt/compositor/client/comp_egl_client.c
··· 327 327 struct client_egl_compositor *ceglc = U_TYPED_CALLOC(struct client_egl_compositor); 328 328 ceglc->dpy = display; 329 329 330 - client_gl_swapchain_create_func sc_create = NULL; 330 + client_gl_swapchain_create_func_t sc_create = NULL; 331 331 332 332 EGL_DEBUG("Extension availability:"); 333 333 #define DUMP_EXTENSION_STATUS(EXT) EGL_DEBUG(" - " #EXT ": %s", GLAD_##EXT ? "true" : "false") ··· 381 381 * EGL_ANDROID_native_fence_sync is available, revisit this when a more 382 382 * generic synchronization mechanism is implemented. 383 383 */ 384 - client_gl_insert_fence_func insert_fence_func = NULL; 384 + client_gl_insert_fence_func_t insert_fence_func = NULL; 385 385 if (GLAD_EGL_ANDROID_native_fence_sync) { 386 386 insert_fence_func = insert_fence_android_native; 387 387 }
+4 -4
src/xrt/compositor/client/comp_gl_client.c
··· 520 520 bool 521 521 client_gl_compositor_init(struct client_gl_compositor *c, 522 522 struct xrt_compositor_native *xcn, 523 - client_gl_context_begin_func context_begin, 524 - client_gl_context_end_func context_end, 525 - client_gl_swapchain_create_func create_swapchain, 526 - client_gl_insert_fence_func insert_fence) 523 + client_gl_context_begin_func_t context_begin, 524 + client_gl_context_end_func_t context_end, 525 + client_gl_swapchain_create_func_t create_swapchain, 526 + client_gl_insert_fence_func_t insert_fence) 527 527 { 528 528 assert(context_begin != NULL); 529 529 assert(context_end != NULL);
+28 -21
src/xrt/compositor/client/comp_gl_client.h
··· 36 36 */ 37 37 struct client_gl_swapchain 38 38 { 39 + //! Implements @ref xrt_swapchain_gl 39 40 struct xrt_swapchain_gl base; 40 41 41 42 struct xrt_swapchain_native *xscn; ··· 43 44 //! The texture target of images in this swapchain. 44 45 uint32_t tex_target; 45 46 46 - //! The compositor this swapchain was created on. Used when swapchain functions need access to the GL context. 47 + /*! 48 + * The compositor this swapchain was created on. Used when swapchain functions need access to the GL context. 49 + * 50 + * Not an owning pointer. 51 + */ 47 52 struct client_gl_compositor *gl_compositor; 48 53 }; 49 54 50 55 /*! 51 56 * Fetches the OpenGL context that is current on this thread and makes the OpenGL context given in the graphics binding 52 - * current instead. Only one thread at a time can operate on the sections between @ref client_gl_context_begin_func and 53 - * @ref client_gl_context_end_func, therefore client_gl_context_end_func MUST be called to avoid blocking the next 54 - * thread calling @ref client_gl_context_begin_func. 57 + * current instead. Only one thread at a time can operate on the sections between @ref client_gl_context_begin_func_t 58 + * and 59 + * @ref client_gl_context_end_func_t, therefore client_gl_context_end_func_t MUST be called to avoid blocking the next 60 + * thread calling @ref client_gl_context_begin_func_t. 55 61 * 56 - * If the return value is not XRT_SUCCESS, @ref client_gl_context_end_func should not be called. 62 + * If the return value is not XRT_SUCCESS, @ref client_gl_context_end_func_t should not be called. 57 63 */ 58 - typedef xrt_result_t (*client_gl_context_begin_func)(struct xrt_compositor *xc); 64 + typedef xrt_result_t (*client_gl_context_begin_func_t)(struct xrt_compositor *xc); 59 65 60 66 /*! 61 - * Makes the OpenGL context current that was current before @ref client_gl_context_begin_func was called. 67 + * Makes the OpenGL context current that was current before @ref client_gl_context_begin_func_t was called. 62 68 */ 63 - typedef void (*client_gl_context_end_func)(struct xrt_compositor *xc); 69 + typedef void (*client_gl_context_end_func_t)(struct xrt_compositor *xc); 64 70 65 71 /*! 66 72 * The type of a swapchain create constructor. ··· 75 81 * - Must populate `destroy` 76 82 * - Does not need to save/restore texture binding 77 83 */ 78 - typedef struct xrt_swapchain *(*client_gl_swapchain_create_func)(struct xrt_compositor *xc, 79 - const struct xrt_swapchain_create_info *info, 80 - struct xrt_swapchain_native *xscn, 81 - struct client_gl_swapchain **out_sc); 84 + typedef struct xrt_swapchain *(*client_gl_swapchain_create_func_t)(struct xrt_compositor *xc, 85 + const struct xrt_swapchain_create_info *info, 86 + struct xrt_swapchain_native *xscn, 87 + struct client_gl_swapchain **out_sc); 82 88 83 89 /*! 84 90 * The type of a fence insertion function. ··· 87 93 * 88 94 * The returned graphics sync handle is given to xrt_compositor::layer_commit. 89 95 */ 90 - typedef xrt_result_t (*client_gl_insert_fence_func)(struct xrt_compositor *xc, xrt_graphics_sync_handle_t *out_handle); 96 + typedef xrt_result_t (*client_gl_insert_fence_func_t)(struct xrt_compositor *xc, 97 + xrt_graphics_sync_handle_t *out_handle); 91 98 92 99 /*! 93 100 * @class client_gl_compositor ··· 106 113 /*! 107 114 * Function pointer for making the OpenGL context current. 108 115 */ 109 - client_gl_context_begin_func context_begin; 116 + client_gl_context_begin_func_t context_begin; 110 117 111 118 /*! 112 119 * Function pointer for restoring prior OpenGL context. 113 120 */ 114 - client_gl_context_end_func context_end; 121 + client_gl_context_end_func_t context_end; 115 122 116 123 /*! 117 124 * Function pointer for creating the client swapchain. 118 125 */ 119 - client_gl_swapchain_create_func create_swapchain; 126 + client_gl_swapchain_create_func_t create_swapchain; 120 127 121 128 /*! 122 129 * Function pointer for inserting fences on 123 130 * xrt_compositor::layer_commit. 124 131 */ 125 - client_gl_insert_fence_func insert_fence; 132 + client_gl_insert_fence_func_t insert_fence; 126 133 127 134 /*! 128 135 * @ref client_gl_xlib_compositor::app_context can only be current on one thread; block other threads while we ··· 165 172 bool 166 173 client_gl_compositor_init(struct client_gl_compositor *c, 167 174 struct xrt_compositor_native *xcn, 168 - client_gl_context_begin_func context_begin, 169 - client_gl_context_end_func context_end, 170 - client_gl_swapchain_create_func create_swapchain, 171 - client_gl_insert_fence_func insert_fence); 175 + client_gl_context_begin_func_t context_begin, 176 + client_gl_context_end_func_t context_end, 177 + client_gl_swapchain_create_func_t create_swapchain, 178 + client_gl_insert_fence_func_t insert_fence); 172 179 173 180 /*! 174 181 * Free all resources from the client_gl_compositor, does not free the
+1 -1
src/xrt/compositor/client/comp_gl_memobj_swapchain.h
··· 43 43 * 44 44 * The caller must ensure that the app context is current. 45 45 * 46 - * @see client_gl_swapchain_create_func, client_gl_compositor_init 46 + * @see client_gl_swapchain_create_func_t, client_gl_compositor_init 47 47 */ 48 48 struct xrt_swapchain * 49 49 client_gl_memobj_swapchain_create(struct xrt_compositor *xc,