wayland: skip the outputs refresh if they didn't change
We have a bunch of logic in there that is effectively no-op if the values don't change. We might as well skip it altogether and save some code from being run to do nothing. Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
parent
cdbe119789
commit
7916352f5b
1 changed files with 4 additions and 0 deletions
|
@ -915,6 +915,10 @@ QList<OutputInterface *> SurfaceInterface::outputs() const
|
|||
|
||||
void SurfaceInterface::setOutputs(const QList<OutputInterface *> &outputs, OutputInterface *primaryOutput)
|
||||
{
|
||||
if (d->outputs == outputs && d->primaryOutput == primaryOutput) {
|
||||
return;
|
||||
}
|
||||
|
||||
QList<OutputInterface *> removedOutputs = d->outputs;
|
||||
for (auto it = outputs.constBegin(), end = outputs.constEnd(); it != end; ++it) {
|
||||
const auto o = *it;
|
||||
|
|
Loading…
Reference in a new issue