diff options
author | Bernd Weimer <bernd.weimer@qt.io> | 2022-07-12 15:03:01 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-07-13 12:39:58 +0000 |
commit | 32bd5523dd4285c03eb8b7973cdc3f287ca08863 (patch) | |
tree | cc4969f1ba7c33048544e9355caf93082d5b8a3f | |
parent | 2b184c07be75ff4e5a43808bbc0916811192c26f (diff) | |
download | qtapplicationmanager-32bd5523dd4285c03eb8b7973cdc3f287ca08863.tar.gz |
Avoid rendering fully transparent node
This improves performance in single-process mode, when an
ApplicationManagerWindow is fully transparent.
Change-Id: I87d35a76c4301b59b513bf19b4de01fb244e028e
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
(cherry picked from commit 1b818ba23087fc57a4392a26f72861c9364d0ba8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/manager-lib/inprocesssurfaceitem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/manager-lib/inprocesssurfaceitem.cpp b/src/manager-lib/inprocesssurfaceitem.cpp index 69c2533b..4ae43b83 100644 --- a/src/manager-lib/inprocesssurfaceitem.cpp +++ b/src/manager-lib/inprocesssurfaceitem.cpp @@ -101,6 +101,9 @@ bool InProcessSurfaceItem::visibleClientSide() const QSGNode *InProcessSurfaceItem::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *) { + if (m_color.alpha() == 0) + return oldNode; // no need to render fully transparent node + QSGSimpleRectNode *node = static_cast<QSGSimpleRectNode *>(oldNode); if (!node) { node = new QSGSimpleRectNode(clipRect(), m_color); |