Consider the opaque region for direct scanout
This commit is contained in:
parent
6569bf80c3
commit
38a15996f4
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue