Commit 38a15996 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

Consider the opaque region for direct scanout

parent 6569bf80
......@@ -641,7 +641,7 @@ void SceneOpenGL::paint(int screenId, const QRegion &damage, const QList<Topleve
Toplevel *toplevel = window->window();
if (toplevel->isOnScreen(screenId) && window->isVisible() && toplevel->opacity() > 0) {
AbstractClient *c = dynamic_cast<AbstractClient*>(toplevel);
if (!c || !c->isFullScreen() || !window->isOpaque()) {
if (!c || !c->isFullScreen()) {
break;
}
auto pixmap = window->windowPixmap<WindowPixmap>();
......@@ -654,6 +654,10 @@ void SceneOpenGL::paint(int screenId, const QRegion &damage, const QList<Topleve
if (pixmap->position() != QPoint(0, 0)) {
break;
}
// and it has to be completely opaque
if (!window->isOpaque() && !pixmap->opaque().contains(QRect(0, 0, window->width(), window->height()))) {
break;
}
directScanout = m_backend->scanout(screenId, pixmap->surface());
break;
}
......
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