core: Add a m_presented assert in OutputFrame::presented()
presented() must be called at most once.
This commit is contained in:
parent
35d4ac716c
commit
5276801d5e
1 changed files with 3 additions and 1 deletions
|
@ -87,11 +87,13 @@ std::optional<RenderTimeSpan> OutputFrame::queryRenderTime() const
|
|||
|
||||
void OutputFrame::presented(std::chrono::nanoseconds timestamp, PresentationMode mode)
|
||||
{
|
||||
Q_ASSERT(!m_presented);
|
||||
m_presented = true;
|
||||
|
||||
const auto renderTime = queryRenderTime();
|
||||
if (m_loop) {
|
||||
RenderLoopPrivate::get(m_loop)->notifyFrameCompleted(timestamp, renderTime, mode, this);
|
||||
}
|
||||
m_presented = true;
|
||||
for (const auto &feedback : m_feedbacks) {
|
||||
feedback->presented(m_refreshDuration, timestamp, mode);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue