Commit f558115d authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez

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.
parent db202f5c
......@@ -289,9 +289,9 @@ void Scene::paintSimpleScreen(int orig_mask, const QRegion &region)
} 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);
if (opaque == shape) {
data.mask = orig_mask | PAINT_WINDOW_OPAQUE;
......
Markdown is supported
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