Drop unnecessary emptiness check
If a buffer is attached to the surface, its width or height cannot be 0.
This commit is contained in:
parent
562a57945b
commit
0c8b77edc0
1 changed files with 10 additions and 12 deletions
|
@ -451,7 +451,6 @@ void SurfaceInterface::Private::swapStates(State *source, State *target, bool em
|
||||||
if (bufferChanged) {
|
if (bufferChanged) {
|
||||||
if (target->buffer && (!target->damage.isEmpty() || !target->bufferDamage.isEmpty())) {
|
if (target->buffer && (!target->damage.isEmpty() || !target->bufferDamage.isEmpty())) {
|
||||||
const QRegion windowRegion = QRegion(0, 0, q->size().width(), q->size().height());
|
const QRegion windowRegion = QRegion(0, 0, q->size().width(), q->size().height());
|
||||||
if (!windowRegion.isEmpty()) {
|
|
||||||
const QRegion bufferDamage = mapFromBuffer(target, target->bufferDamage);
|
const QRegion bufferDamage = mapFromBuffer(target, target->bufferDamage);
|
||||||
target->damage = windowRegion.intersected(target->damage.united(bufferDamage));
|
target->damage = windowRegion.intersected(target->damage.united(bufferDamage));
|
||||||
trackedDamage = trackedDamage.united(target->damage);
|
trackedDamage = trackedDamage.united(target->damage);
|
||||||
|
@ -466,7 +465,6 @@ void SurfaceInterface::Private::swapStates(State *source, State *target, bool em
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (target->size != oldSize) {
|
if (target->size != oldSize) {
|
||||||
emit q->sizeChanged();
|
emit q->sizeChanged();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue