diff --git a/client/displayservers/Wayland/gl.c b/client/displayservers/Wayland/gl.c index 8a69237b..63d86e8a 100644 --- a/client/displayservers/Wayland/gl.c +++ b/client/displayservers/Wayland/gl.c @@ -83,7 +83,7 @@ static void applyHDRPending(void) if (action == WAYLAND_HDR_PENDING_APPLY) { - waylandSetHDRImageDescription( + waylandSetHDRImageDesc( params.displayPrimary, params.whitePoint, params.maxDisplayLuminance, params.minDisplayLuminance, @@ -94,10 +94,10 @@ static void applyHDRPending(void) params.metadata); } else if (action == WAYLAND_HDR_PENDING_CLEAR) - waylandClearHDRImageDescription(); + waylandClearHDRImageDesc(); } -void waylandClearHDRImageDescription(void) +void waylandClearHDRImageDesc(void) { LG_LOCK(wlWm.hdrLock); if (wlWm.hdrImageCreator) @@ -120,7 +120,7 @@ void waylandClearHDRImageDescription(void) DEBUG_INFO("HDR image description removed from surface"); } -static void hdrImageDescriptionReady(struct wp_image_description_v1 * desc) +static void hdrImageDescReady(struct wp_image_description_v1 * desc) { LG_LOCK(wlWm.hdrLock); if (desc != wlWm.hdrImageDesc) @@ -150,7 +150,7 @@ static void hdrImageDescriptionReady(struct wp_image_description_v1 * desc) waylandStopWaitFrame(); } -static void activateReadyHDRImageDescription(void) +static void activateReadyHDRImageDesc(void) { LG_LOCK(wlWm.hdrLock); if (!wlWm.hdrImageDesc || !wlWm.hdrImageDescReady || !wlWm.colorSurface) @@ -180,7 +180,7 @@ static void activateReadyHDRImageDescription(void) waylandStopWaitFrame(); } -static void hdrImageDescriptionFailed(void * data, +static void hdrImageDescFailed(void * data, struct wp_image_description_v1 * desc, uint32_t cause, const char * message) { (void)data; @@ -203,29 +203,29 @@ static void hdrImageDescriptionFailed(void * data, waylandStopWaitFrame(); } -static void hdrImageDescriptionReadyV1(void * data, +static void hdrImageDescReadyV1(void * data, struct wp_image_description_v1 * desc, uint32_t identity) { (void)data; (void)identity; - hdrImageDescriptionReady(desc); + hdrImageDescReady(desc); } -static void hdrImageDescriptionReadyV2(void * data, +static void hdrImageDescReadyV2(void * data, struct wp_image_description_v1 * desc, uint32_t identityHi, uint32_t identityLo) { (void)data; (void)identityHi; (void)identityLo; - hdrImageDescriptionReady(desc); + hdrImageDescReady(desc); } static const struct wp_image_description_v1_listener hdrImageDescListener = { - .failed = hdrImageDescriptionFailed, - .ready = hdrImageDescriptionReadyV1, - .ready2 = hdrImageDescriptionReadyV2, + .failed = hdrImageDescFailed, + .ready = hdrImageDescReadyV1, + .ready2 = hdrImageDescReadyV2, }; void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct Rect * damage, int count) @@ -244,7 +244,7 @@ void waylandEGLSwapBuffers(EGLDisplay display, EGLSurface surface, const struct waylandPresentationFrame(); applyHDRPending(); swapWithDamage(&wlWm.swapWithDamage, display, surface, damage, count); - activateReadyHDRImageDescription(); + activateReadyHDRImageDesc(); if (wlWm.needsResize) { @@ -363,7 +363,7 @@ static bool hdrTargetLuminanceContained(uint32_t minLuminance, maxLuminance <= HDR_PQ_MAX_LUMINANCE; } -void waylandSetHDRImageDescription(const uint16_t displayPrimary[3][2], +void waylandSetHDRImageDesc(const uint16_t displayPrimary[3][2], const uint16_t whitePoint[2], uint32_t maxDisplayLuminance, uint32_t minDisplayLuminance, uint32_t maxCLL, uint32_t maxFALL, uint32_t referenceWhiteLevel, bool hdrPQ, bool hdrMetadata) diff --git a/client/displayservers/Wayland/output.c b/client/displayservers/Wayland/output.c index 7c9d32c0..3ff91559 100644 --- a/client/displayservers/Wayland/output.c +++ b/client/displayservers/Wayland/output.c @@ -240,7 +240,7 @@ static void outputRequestColorDescription(struct WaylandOutput * output) desc->description, &outputDescriptionListener, desc); } -static void outputImageDescriptionChanged(void * data, +static void outputImageDescChanged(void * data, struct wp_color_management_output_v1 * colorOutput) { outputRequestColorDescription(data); @@ -248,7 +248,7 @@ static void outputImageDescriptionChanged(void * data, static const struct wp_color_management_output_v1_listener colorOutputListener = { - .image_description_changed = outputImageDescriptionChanged, + .image_description_changed = outputImageDescChanged, }; void waylandOutputColorMgmtInit(struct WaylandOutput * output) diff --git a/client/displayservers/Wayland/wayland.c b/client/displayservers/Wayland/wayland.c index 712c6967..ebc8ede9 100644 --- a/client/displayservers/Wayland/wayland.c +++ b/client/displayservers/Wayland/wayland.c @@ -333,7 +333,7 @@ struct LG_DisplayServerOps LGDS_Wayland = .getFullscreen = waylandGetFullscreen, .minimize = waylandMinimize, - .setHDRImageDescription = waylandHDRCallback, + .setHDRImageDesc = waylandHDRCallback, .cbInit = waylandCBInit, .cbNotice = waylandCBNotice, diff --git a/client/displayservers/Wayland/wayland.h b/client/displayservers/Wayland/wayland.h index 2892758b..1c9aa84c 100644 --- a/client/displayservers/Wayland/wayland.h +++ b/client/displayservers/Wayland/wayland.h @@ -345,11 +345,11 @@ void waylandGLSwapBuffers(void); // HDR color management (Wayland color-management-v1) bool waylandColorMgmtInit(void); void waylandColorMgmtFree(void); -void waylandSetHDRImageDescription(const uint16_t displayPrimary[3][2], +void waylandSetHDRImageDesc(const uint16_t displayPrimary[3][2], const uint16_t whitePoint[2], uint32_t maxDisplayLuminance, uint32_t minDisplayLuminance, uint32_t maxCLL, uint32_t maxFALL, uint32_t referenceWhiteLevel, bool hdrPQ, bool hdrMetadata); -void waylandClearHDRImageDescription(void); +void waylandClearHDRImageDesc(void); // Queue HDR change from any thread (applied in waylandEGLSwapBuffers). // Returns true if the request was queued, false if HDR is not available diff --git a/client/include/app.h b/client/include/app.h index 6f663ce0..6d53990c 100644 --- a/client/include/app.h +++ b/client/include/app.h @@ -89,7 +89,7 @@ bool app_getFullscreen(void); bool app_getProp(LG_DSProperty prop, void * ret); /** - * Returns true if the last call to setHDRImageDescription() failed. + * Returns true if the last call to setHDRImageDesc() failed. * When this returns true, the renderer should fall back to software * tone-mapping even on a compositor that reports LG_DS_NATIVE_HDR. */ diff --git a/client/include/interface/displayserver.h b/client/include/interface/displayserver.h index cefdddd9..df13c693 100644 --- a/client/include/interface/displayserver.h +++ b/client/include/interface/displayserver.h @@ -56,7 +56,7 @@ typedef enum LG_DSProperty /** * returns true if the display server supports native HDR via - * setHDRImageDescription (i.e., the compositor actually has the + * setHDRImageDesc (i.e., the compositor actually has the * required color-management features to process HDR content). * return data type: bool */ @@ -241,7 +241,7 @@ struct LG_DisplayServerOps * Returns true on success, false if the description could not be applied * (e.g., compositor doesn't support the required transfer function or * primaries, or the image description creation failed). */ - bool (*setHDRImageDescription)(const void * rendererFormat); + bool (*setHDRImageDesc)(const void * rendererFormat); /* clipboard support, optional, if not supported set to NULL */ bool (*cbInit)(void); diff --git a/client/src/main.h b/client/src/main.h index 773b4113..a16c7627 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -169,7 +169,7 @@ struct AppState int spiceHotX, spiceHotY; - // Set to true when setHDRImageDescription() returns false, indicating + // Set to true when setHDRImageDesc() returns false, indicating // the display server could not apply the HDR image description. // Checked by the renderer to fall back to software tone-mapping. _Atomic(bool) hdrDescFailed; diff --git a/client/src/render_queue.c b/client/src/render_queue.c index b0302a4e..34839d01 100644 --- a/client/src/render_queue.c +++ b/client/src/render_queue.c @@ -36,7 +36,7 @@ static LG_RendererFormat l_surfaceFormat; static void updateSurfaceFormat(void) { - if (!g_state.ds->setHDRImageDescription) + if (!g_state.ds->setHDRImageDesc) return; LG_RendererFormat format = {}; @@ -50,7 +50,7 @@ static void updateSurfaceFormat(void) format.hdr = false; format.hdrPQ = false; format.hdrMetadata = false; - g_state.ds->setHDRImageDescription(&format); + g_state.ds->setHDRImageDesc(&format); atomic_store(&g_state.hdrDescFailed, false); return; } @@ -63,12 +63,12 @@ static void updateSurfaceFormat(void) format.hdr = false; format.hdrPQ = false; format.hdrMetadata = false; - g_state.ds->setHDRImageDescription(&format); + g_state.ds->setHDRImageDesc(&format); DEBUG_WARN("Renderer surface cannot represent the native HDR encoding; " "using software HDR mapping"); atomic_store(&g_state.hdrDescFailed, true); } - else if (!g_state.ds->setHDRImageDescription(&format)) + else if (!g_state.ds->setHDRImageDesc(&format)) { DEBUG_WARN("Display server failed to apply HDR image description"); atomic_store(&g_state.hdrDescFailed, true);