diff options
| author | UjinT34 <41110182+UjinT34@users.noreply.github.com> | 2026-02-10 17:55:21 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-10 14:55:21 +0000 |
| commit | ff061d177e86435a0d9f5605153a4567e2fcd88b (patch) | |
| tree | 5c5fad1a485b2af162e3d3e11aecacaa8e03834f /src/helpers/Monitor.cpp | |
| parent | 407a623801b8cb5b863e5056b2d5a195452776fa (diff) | |
protocols: commit and presentation timing fixes (#13174)
* move commit timing fields to surface state
* fix toTimespec init
* update sendQueued api
* update onPresented api
* set zero copy flag
* send clock id
* move presented calcs inside condition
* use only CLOCK_MONOTONIC for commit/presentation timings
* fix setSetTimestamp
* do not wait for commit timing while tearing
* proto config
* fix config defaults
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index f0077c63..be0b78fd 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -114,10 +114,12 @@ void CMonitor::onConnect(bool noRule) { ts = nullptr; } - if (!ts) - PROTO::presentation->onPresented(m_self.lock(), Time::steadyNow(), event.refresh, event.seq, event.flags); - else - PROTO::presentation->onPresented(m_self.lock(), Time::fromTimespec(event.when), event.refresh, event.seq, event.flags); + if (!ts) { + timespec mono{}; + clock_gettime(CLOCK_MONOTONIC, &mono); + PROTO::presentation->onPresented(m_self.lock(), mono, event.refresh, event.seq, event.flags & ~Aquamarine::IOutput::AQ_OUTPUT_PRESENT_HW_CLOCK); + } else + PROTO::presentation->onPresented(m_self.lock(), *ts, event.refresh, event.seq, event.flags); if (m_zoomAnimFrameCounter < 5) { m_zoomAnimFrameCounter++; |
