mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-22 23:32:03 +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:
@@ -431,8 +431,11 @@ int main_cursorThread(void * unused)
|
||||
}
|
||||
|
||||
KVMFRCursor * tmp = (KVMFRCursor *)msg.mem;
|
||||
const int neededSize = sizeof(*tmp) +
|
||||
(msg.udata & CURSOR_FLAG_SHAPE ? tmp->height * tmp->pitch : 0);
|
||||
const int shapeSize = msg.udata & CURSOR_FLAG_SHAPE ?
|
||||
tmp->height * tmp->pitch : 0;
|
||||
const int neededSize = sizeof(*tmp) + shapeSize +
|
||||
(msg.udata & CURSOR_FLAG_COLOR_TRANSFORM ?
|
||||
sizeof(KVMFRColorTransform) : 0);
|
||||
|
||||
if (cursor && neededSize > cursorSize)
|
||||
{
|
||||
@@ -488,6 +491,15 @@ int main_cursorThread(void * unused)
|
||||
}
|
||||
}
|
||||
|
||||
if ((msg.udata & CURSOR_FLAG_COLOR_TRANSFORM) &&
|
||||
g_state.lgr->ops.onMouseColorTransform)
|
||||
{
|
||||
const KVMFRColorTransform * transform =
|
||||
(const KVMFRColorTransform *)((const uint8_t *)(cursor + 1) +
|
||||
shapeSize);
|
||||
g_state.lgr->ops.onMouseColorTransform(g_state.lgr, transform);
|
||||
}
|
||||
|
||||
if (msg.udata & CURSOR_FLAG_POSITION)
|
||||
{
|
||||
bool valid = g_cursor.guest.valid;
|
||||
@@ -517,7 +529,9 @@ int main_cursorThread(void * unused)
|
||||
g_cursor.guest.hy
|
||||
);
|
||||
|
||||
if (g_params.mouseRedraw && g_cursor.guest.visible && !g_state.stopVideo)
|
||||
if ((g_params.mouseRedraw ||
|
||||
(msg.udata & CURSOR_FLAG_COLOR_TRANSFORM)) &&
|
||||
g_cursor.guest.visible && !g_state.stopVideo)
|
||||
lgSignalEvent(g_state.frameEvent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user