platforms/drm: inhibit the renderloop when screen is turned off
Otherwise we will continue using gpu resources even when we can not show any content on screen.
This commit is contained in:
parent
e7a5726c8b
commit
debea631f3
1 changed files with 2 additions and 0 deletions
|
@ -515,6 +515,7 @@ void DrmOutput::dpmsFinishOn()
|
||||||
|
|
||||||
m_backend->checkOutputsAreOn();
|
m_backend->checkOutputsAreOn();
|
||||||
m_crtc->blank(this);
|
m_crtc->blank(this);
|
||||||
|
m_renderLoop->uninhibit();
|
||||||
if (Compositor *compositor = Compositor::self()) {
|
if (Compositor *compositor = Compositor::self()) {
|
||||||
compositor->addRepaintFull();
|
compositor->addRepaintFull();
|
||||||
}
|
}
|
||||||
|
@ -530,6 +531,7 @@ void DrmOutput::dpmsFinishOff()
|
||||||
} else {
|
} else {
|
||||||
waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off));
|
waylandOutput()->setDpmsMode(toWaylandDpmsMode(DpmsMode::Off));
|
||||||
}
|
}
|
||||||
|
m_renderLoop->inhibit();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DrmOutput::dpmsLegacyApply()
|
bool DrmOutput::dpmsLegacyApply()
|
||||||
|
|
Loading…
Reference in a new issue