compositor_wayland: count rendering time for all steps of compositing
Otherwise, prePaintPass, postPaintPass and possible future overhead like overlay plane matching aren't accounted for, which can cause frames to be dropped. CCBUG: 488782
This commit is contained in:
parent
7b486e215d
commit
c3d202b0d2
1 changed files with 3 additions and 0 deletions
|
@ -293,6 +293,7 @@ void WaylandCompositor::composite(RenderLoop *renderLoop)
|
|||
auto frame = std::make_shared<OutputFrame>(renderLoop, std::chrono::nanoseconds(1'000'000'000'000 / output->refreshRate()));
|
||||
|
||||
if (primaryLayer->needsRepaint() || superLayer->needsRepaint()) {
|
||||
auto totalTimeQuery = std::make_unique<CpuRenderTimeQuery>();
|
||||
renderLoop->beginPaint();
|
||||
|
||||
QRegion surfaceDamage = primaryLayer->repaints();
|
||||
|
@ -340,6 +341,8 @@ void WaylandCompositor::composite(RenderLoop *renderLoop)
|
|||
}
|
||||
|
||||
postPaintPass(superLayer);
|
||||
totalTimeQuery->end();
|
||||
frame->addRenderTimeQuery(std::move(totalTimeQuery));
|
||||
}
|
||||
|
||||
m_backend->present(output, frame);
|
||||
|
|
Loading…
Reference in a new issue