[idd] capture: recover final desktop updates

Request one static-desktop re-encode and inspect repeated presentation
numbers for its empty dirty-rectangle marker.

Prepare every marker in a free candidate without superseding retained
damage, so the last desktop update survives a late copy failure.
This commit is contained in:
Geoffrey McRae
2026-08-06 14:52:37 +10:00
parent 909271bfe1
commit f65ecdaf5d
3 changed files with 82 additions and 43 deletions

View File

@@ -107,6 +107,7 @@ private:
Wrappers::HandleT<Wrappers::HandleTraits::HANDLENullTraits> m_thread[3];
Wrappers::Event m_terminateEvent;
Wrappers::Event m_candidateEvent;
Wrappers::Event m_candidateAvailableEvent;
Wrappers::HandleT<Wrappers::HandleTraits::HANDLENullTraits> m_publishTimer;
Wrappers::Event m_cursorDataEvent;
@@ -147,7 +148,7 @@ private:
const CFrameScheduler::Schedule& schedule, bool periodic,
uint64_t publishStart);
bool HasReadyCandidate();
int AcquireCandidate(bool exclusiveSample);
int AcquireCandidate(bool exclusiveSample, bool allowSupersede);
void ReleaseCandidate(unsigned candidateIndex);
bool EnsureCandidateResource(
unsigned candidateIndex, size_t frameSize);
@@ -171,7 +172,7 @@ private:
bool SwapChainNewFrame(ComPtr<IDXGIResource> acquiredBuffer,
unsigned dirtyRectCount, unsigned moveRegionCount,
DXGI_COLOR_SPACE_TYPE colorSpace, UINT sdrWhiteLevel,
uint64_t captureStart);
uint64_t captureStart, bool duplicateFrame);
public:
CSwapChainProcessor(CIndirectMonitorContext * monitorContext, UINT64 assignmentGeneration,