summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbconnection.h
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2018-09-18 14:26:22 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2018-09-29 09:33:04 +0000
commit60cecc86f8cde0b2d4e727b9d0fe8a6cb994d660 (patch)
tree823b6a1f0f8bd21854e2e32da1939c91642cfa22 /src/plugins/platforms/xcb/qxcbconnection.h
parente4a5483eaedaba8437441868dd87e14d1f605430 (diff)
xcb: Initialize OpenGL integration only when required
In some cases OpenGL integration may be unnecessary, e.g. an application may set Qt::AA_ForceRasterWidgets attribute and don't use OpenGL in any other way. In addition OpenGL initialization can take noticeable time on some configurations. So do it on demand only. Change-Id: If88953f8d5c826bc96fd49eb397b5e1ad693546d Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbconnection.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index 94f8a8876a..1e28ef8fac 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -546,7 +546,7 @@ public:
bool canGrab() const { return m_canGrabServer; }
- QXcbGlIntegration *glIntegration() const { return m_glIntegration; }
+ QXcbGlIntegration *glIntegration() const;
protected:
bool event(QEvent *e) override;
@@ -727,7 +727,8 @@ private:
xcb_window_t m_clientLeader = 0;
QByteArray m_startupId;
QXcbSystemTrayTracker *m_systemTrayTracker = nullptr;
- QXcbGlIntegration *m_glIntegration = nullptr;
+ mutable QXcbGlIntegration *m_glIntegration = nullptr;
+ mutable bool m_glIntegrationInitialized = false;
bool m_xiGrab = false;
QVector<int> m_xiMasterPointerIds;