mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 06:42:02 +00:00
[idd/client] apply the Windows display color transform
Honor the IddCx 3x4 XYZ matrix and post-transfer LUT in the IDD conversion pipeline. Carry transform changes to the client so EGL applies the same calibration to hardware cursors, and invalidate the full frame whenever calibration changes.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "types.h"
|
||||
|
||||
#define KVMFR_MAGIC "KVMFR---"
|
||||
#define KVMFR_VERSION 21
|
||||
#define KVMFR_VERSION 22
|
||||
|
||||
// Fallback used by producers that cannot report the source display's SDR
|
||||
// white level. IDD frames override this with IDDCX_METADATA2::SdrWhiteLevel.
|
||||
@@ -51,9 +51,10 @@
|
||||
|
||||
enum
|
||||
{
|
||||
CURSOR_FLAG_POSITION = 0x1,
|
||||
CURSOR_FLAG_VISIBLE = 0x2,
|
||||
CURSOR_FLAG_SHAPE = 0x4
|
||||
CURSOR_FLAG_POSITION = 0x1,
|
||||
CURSOR_FLAG_VISIBLE = 0x2,
|
||||
CURSOR_FLAG_SHAPE = 0x4,
|
||||
CURSOR_FLAG_COLOR_TRANSFORM = 0x8
|
||||
};
|
||||
|
||||
typedef uint32_t KVMFRCursorFlags;
|
||||
@@ -137,6 +138,28 @@ typedef struct KVMFRCursor
|
||||
}
|
||||
KVMFRCursor;
|
||||
|
||||
enum
|
||||
{
|
||||
KVMFR_COLOR_TRANSFORM_MATRIX = 0x1,
|
||||
KVMFR_COLOR_TRANSFORM_LUT = 0x2,
|
||||
};
|
||||
|
||||
typedef uint32_t KVMFRColorTransformFlags;
|
||||
|
||||
// Optional payload appended to KVMFRCursor when
|
||||
// CURSOR_FLAG_COLOR_TRANSFORM is present. The matrix is an XYZ-to-XYZ
|
||||
// adjustment; the LUT is applied after encoding to the active wire transfer
|
||||
// function. Four LUT components keep the payload directly uploadable as an
|
||||
// RGBA32F texture, with alpha reserved and set to 1.0.
|
||||
typedef struct KVMFRColorTransform
|
||||
{
|
||||
KVMFRColorTransformFlags flags;
|
||||
float matrix[3][4];
|
||||
float scalar;
|
||||
float lut[4096][4];
|
||||
}
|
||||
KVMFRColorTransform;
|
||||
|
||||
enum
|
||||
{
|
||||
FRAME_FLAG_BLOCK_SCREENSAVER = 0x1 ,
|
||||
|
||||
Reference in New Issue
Block a user