scene: prefer calling mapToGlobal just once
It's the same top mapToGlobal()+operator& than the other way around and
we get to skip 1 call.
This path is the most common so we better save it.
(cherry picked from commit f558115def
)
icc-effect-5.20.5
parent
6e56d5741d
commit
ba2aab2f04
|
@ -291,9 +291,9 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion ®ion)
|
|||
} else if (toplevel->hasAlpha() && toplevel->opacity() == 1.0) {
|
||||
const WindowPixmap *windowPixmap = window->windowPixmap<WindowPixmap>();
|
||||
if (windowPixmap) {
|
||||
const QRegion shape = windowPixmap->mapToGlobal(windowPixmap->shape());
|
||||
const QRegion opaque = windowPixmap->mapToGlobal(windowPixmap->opaque());
|
||||
data.clip = shape & opaque;
|
||||
const QRegion shape = windowPixmap->shape();
|
||||
const QRegion opaque = windowPixmap->opaque();
|
||||
data.clip = windowPixmap->mapToGlobal(shape & opaque);
|
||||
}
|
||||
} else {
|
||||
data.clip = QRegion();
|
||||
|
|
Loading…
Reference in New Issue