Signed-off-by: shegangbin <shegangbin1@huawei.com>
This commit is contained in:
shegangbin 2024-05-06 12:54:06 +08:00
parent ccfdd34517
commit 9f8669d933

View File

@ -549,14 +549,17 @@ void VSyncDistributor::OnVSyncTrigger(int64_t now, int64_t period, uint32_t refr
vsyncMode_ = vsyncMode;
ChangeConnsRateLocked();
if (vsyncMode_ == VSYNC_MODE_LTPO) {
CollectConnectionsLTPO(waitForVSync, now, conns, event_.vsyncPulseCount);
} else {
CollectConnections(waitForVSync, now, conns, event_.vsyncCount);
}
if (!waitForVSync) {
DisableVSync();
return;
{
std::lock_guard<std::mutex> locker(mutex_);
if (vsyncMode_ == VSYNC_MODE_LTPO) {
CollectConnectionsLTPO(waitForVSync, now, conns, event_.vsyncPulseCount);
} else {
CollectConnections(waitForVSync, now, conns, event_.vsyncCount);
}
if (!waitForVSync) {
DisableVSync();
return;
}
}
countTraceValue_ = (countTraceValue_ + 1) % 2; // 2 : change num