backends/{x11,virtual}: Allocate render data for all available outputs
This makes the behavior of virtual and x11 backend consistent with the drm and the wayland backend and reduces the number of users of the Platform::outputEnabled signal.
This commit is contained in:
parent
f6054863e1
commit
c7293d95e0
3 changed files with 9 additions and 15 deletions
|
@ -122,13 +122,11 @@ void VirtualEglBackend::init()
|
|||
|
||||
const auto outputs = m_backend->outputs();
|
||||
for (Output *output : outputs) {
|
||||
if (output->isEnabled()) {
|
||||
addOutput(output);
|
||||
}
|
||||
addOutput(output);
|
||||
}
|
||||
|
||||
connect(m_backend, &VirtualBackend::outputEnabled, this, &VirtualEglBackend::addOutput);
|
||||
connect(m_backend, &VirtualBackend::outputDisabled, this, &VirtualEglBackend::removeOutput);
|
||||
connect(m_backend, &VirtualBackend::outputAdded, this, &VirtualEglBackend::addOutput);
|
||||
connect(m_backend, &VirtualBackend::outputRemoved, this, &VirtualEglBackend::removeOutput);
|
||||
}
|
||||
|
||||
bool VirtualEglBackend::initRenderingContext()
|
||||
|
|
|
@ -47,14 +47,12 @@ VirtualQPainterBackend::VirtualQPainterBackend(VirtualBackend *backend)
|
|||
: QPainterBackend()
|
||||
, m_backend(backend)
|
||||
{
|
||||
connect(backend, &VirtualBackend::outputEnabled, this, &VirtualQPainterBackend::addOutput);
|
||||
connect(backend, &VirtualBackend::outputDisabled, this, &VirtualQPainterBackend::removeOutput);
|
||||
connect(backend, &VirtualBackend::outputAdded, this, &VirtualQPainterBackend::addOutput);
|
||||
connect(backend, &VirtualBackend::outputRemoved, this, &VirtualQPainterBackend::removeOutput);
|
||||
|
||||
const auto outputs = backend->outputs();
|
||||
for (Output *output : outputs) {
|
||||
if (output->isEnabled()) {
|
||||
addOutput(output);
|
||||
}
|
||||
addOutput(output);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,13 +52,11 @@ X11WindowedQPainterBackend::X11WindowedQPainterBackend(X11WindowedBackend *backe
|
|||
{
|
||||
const auto outputs = m_backend->outputs();
|
||||
for (Output *output : outputs) {
|
||||
if (output->isEnabled()) {
|
||||
addOutput(output);
|
||||
}
|
||||
addOutput(output);
|
||||
}
|
||||
|
||||
connect(backend, &X11WindowedBackend::outputEnabled, this, &X11WindowedQPainterBackend::addOutput);
|
||||
connect(backend, &X11WindowedBackend::outputDisabled, this, &X11WindowedQPainterBackend::removeOutput);
|
||||
connect(backend, &X11WindowedBackend::outputAdded, this, &X11WindowedQPainterBackend::addOutput);
|
||||
connect(backend, &X11WindowedBackend::outputRemoved, this, &X11WindowedQPainterBackend::removeOutput);
|
||||
}
|
||||
|
||||
X11WindowedQPainterBackend::~X11WindowedQPainterBackend()
|
||||
|
|
Loading…
Reference in a new issue