screencopy: Handle explicit sync failure (#10050)
This commit is contained in:
parent
382f0f23f1
commit
0399e64274
1 changed files with 10 additions and 9 deletions
|
|
@ -231,16 +231,17 @@ void CScreencopyFrame::copyDmabuf(std::function<void(bool)> callback) {
|
|||
|
||||
auto explicitOptions = g_pHyprRenderer->getExplicitSyncSettings(pMonitor->output);
|
||||
if (pMonitor->inTimeline && explicitOptions.explicitEnabled) {
|
||||
pMonitor->inTimeline->addWaiter(
|
||||
[callback]() {
|
||||
LOGM(TRACE, "Copied frame via dma with explicit sync");
|
||||
callback(true);
|
||||
},
|
||||
pMonitor->inTimelinePoint, 0);
|
||||
} else {
|
||||
LOGM(TRACE, "Copied frame via dma");
|
||||
callback(true);
|
||||
if (pMonitor->inTimeline->addWaiter(
|
||||
[callback, sync = pMonitor->eglSync]() {
|
||||
LOGM(TRACE, "Copied frame via dma with explicit sync");
|
||||
callback(true);
|
||||
},
|
||||
pMonitor->inTimelinePoint, 0))
|
||||
return;
|
||||
// on explicit sync failure, fallthrough to immediate callback
|
||||
}
|
||||
LOGM(TRACE, "Copied frame via dma");
|
||||
callback(true);
|
||||
}
|
||||
|
||||
bool CScreencopyFrame::copyShm() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue