summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow_p.h
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2020-09-30 13:37:12 +0200
committerAleix Pol <aleixpol@kde.org>2020-10-22 00:21:10 +0200
commitcc779e0ed47ec4759dc3c23953dd02cfacc6885c (patch)
treefc843e2ef9bbc9b2690217132e6dbfa8deead858 /src/client/qwaylandwindow_p.h
parentf637fcdbbabeb060cdd223d8bc6662d5cace6b90 (diff)
Issue set_opaque_region on opaque surfaces
The application will tell Qt whether the background is transparent through either Qt::WA_TranslucentBackground or QQuickWindow::setColor. These will set a QSurfaceFormat. This change checks the QSurfaceFormat and issues the opacity information so we can properly implement culling optimizations in the compositor. Change-Id: I4f7562467449eac7931f3011d4b835934212adad Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit 0db685834f8377e41b147d3367b8ec514841eff5)
Diffstat (limited to 'src/client/qwaylandwindow_p.h')
-rw-r--r--src/client/qwaylandwindow_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 35a2c0321..6cc1664b7 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -254,6 +254,7 @@ protected:
Qt::WindowFlags mFlags;
QRegion mMask;
+ QRegion mOpaqueArea;
Qt::WindowStates mLastReportedWindowStates = Qt::WindowNoState;
QWaylandShmBackingStore *mBackingStore = nullptr;
@@ -270,6 +271,8 @@ private:
void sendExposeEvent(const QRect &rect);
static void closePopups(QWaylandWindow *parent);
QPlatformScreen *calculateScreenFromSurfaceEvents() const;
+ void setOpaqueArea(const QRegion &opaqueArea);
+ bool isOpaque() const;
void handleMouseEventWithDecoration(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e);
void handleScreensChanged();