Commit c7293d95 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

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.
parent f6054863
Pipeline #216750 passed with stage
in 12 minutes and 44 seconds
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment