test: print sw rendering reason

This commit is contained in:
Virt 2024-07-22 16:40:04 +02:00
commit 052037d74d

View file

@ -62,6 +62,7 @@ void CDynamicCursors::renderSoftware(CPointerManager* pointers, SP<CMonitor> pMo
auto state = pointers->stateFor(pMonitor); auto state = pointers->stateFor(pMonitor);
auto zoom = resultShown.scale; auto zoom = resultShown.scale;
Debug::log(LOG, "[dynamic-cursors] current sw cursor status: hw failure = {}, locks = {}", state->hardwareFailed, state->softwareLocks);
if ((!state->hardwareFailed && state->softwareLocks == 0)) { if ((!state->hardwareFailed && state->softwareLocks == 0)) {
if (pointers->currentCursorImage.surface) if (pointers->currentCursorImage.surface)
pointers->currentCursorImage.surface->resource()->frame(now); pointers->currentCursorImage.surface->resource()->frame(now);
@ -357,6 +358,7 @@ void CDynamicCursors::calculate(EModeUpdate type) {
// lock software cursors if zooming // lock software cursors if zooming
if (resultShown.scale > 1) { if (resultShown.scale > 1) {
if (!zoomSoftware) { if (!zoomSoftware) {
Debug::log(LOG, "[dynamic-cursors] locking sw cursors for zoom");
g_pPointerManager->lockSoftwareAll(); g_pPointerManager->lockSoftwareAll();
zoomSoftware = true; zoomSoftware = true;
} }
@ -365,6 +367,7 @@ void CDynamicCursors::calculate(EModeUpdate type) {
// damage so it is cleared properly // damage so it is cleared properly
g_pPointerManager->damageIfSoftware(); g_pPointerManager->damageIfSoftware();
Debug::log(LOG, "[dynamic-cursors] unlocking sw cursors for zoom");
g_pPointerManager->unlockSoftwareAll(); g_pPointerManager->unlockSoftwareAll();
zoomSoftware = false; zoomSoftware = false;
} }