Only scanout when the texture matches the display size
Otherwise drmModeAtomicCommit() in DrmOutput::doAtomicCommit() fails due to unmatched buffer sizes. While rendering continues working properly, this makes drm freak out and try to go back to a previous state (see the test commit in presentAtomically()) that in turn starts issuing screen events to every process even though it's just to say the same thing. The fact that this happens per frame makes the system unusable as soon as fullscreen starts happening on a scaled display. Another thing we could do is get EglGbmBackend::scanout() to take care of the resizing.
This commit is contained in:
parent
82551e143d
commit
58debd72a3
1 changed files with 1 additions and 2 deletions
|
@ -698,8 +698,7 @@ bool EglGbmBackend::scanout(int screenId, KWaylandServer::SurfaceInterface *surf
|
||||||
}
|
}
|
||||||
auto buffer = surface->buffer();
|
auto buffer = surface->buffer();
|
||||||
Output output = m_outputs[screenId];
|
Output output = m_outputs[screenId];
|
||||||
if (buffer->linuxDmabufBuffer()->size() != output.output->modeSize()
|
if (buffer->linuxDmabufBuffer()->size() != output.output->modeSize()) {
|
||||||
&& output.output->isBeingRecorded()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
EglDmabufBuffer *dmabuf = static_cast<EglDmabufBuffer*>(buffer->linuxDmabufBuffer());
|
EglDmabufBuffer *dmabuf = static_cast<EglDmabufBuffer*>(buffer->linuxDmabufBuffer());
|
||||||
|
|
Loading…
Reference in a new issue