mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 06:42:02 +00:00
[client] egl: make native HDR encoding-safe
Request true floating-point EGL configs for scRGB and expose the native encodings supported by the selected surface. Fall back to software HDR mapping when the surface cannot represent the incoming wire format. Resample PQ in linear light, keep SDR-only effects out of native PQ chains, and consume the cursor-specific white level without changing binary monochrome cursor mask operations.
This commit is contained in:
@@ -501,7 +501,12 @@ struct CursorState egl_cursorRender(EGL_Cursor * cursor,
|
||||
void egl_cursorSetHDRState(EGL_Cursor * cursor, bool hdrActive, bool hdrPQ,
|
||||
float sdrWhiteLevel)
|
||||
{
|
||||
atomic_store(&cursor->sdrWhiteLevel, sdrWhiteLevel > 0.0f ?
|
||||
sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
||||
egl_cursorSetSDRWhiteLevel(cursor, sdrWhiteLevel);
|
||||
atomic_store(&cursor->wireTransfer, !hdrActive ? 0 : (hdrPQ ? 2 : 1));
|
||||
}
|
||||
|
||||
void egl_cursorSetSDRWhiteLevel(EGL_Cursor * cursor, float sdrWhiteLevel)
|
||||
{
|
||||
atomic_store(&cursor->sdrWhiteLevel, sdrWhiteLevel > 0.0f ?
|
||||
sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user