diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2019-01-22 20:28:49 +0100 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2019-01-24 23:00:42 +0000 |
commit | 4c46e3189ac96c8ebcbe1caa47227c4e086d12ff (patch) | |
tree | e102e2390f0d8a3cbb35b7d9510ed51543a5351e /src/plugins/platforms/windows/qwindowswindow.h | |
parent | fffe5d622549f85968ea0be9717b90cbc020be71 (diff) |
Windows QPA: Cache "forcedScreenForGLWindow" to avoid overhead
The fix for QTBUG-50371 caused an overhead when you hover over a
secondary window like a tool tip, menu or combo box due to the
forcedScreenForGLWindow() function being called, which loads
dx9.dll and sub-dlls and unloads them afterwards. This fix
caches the required info on the first call, and only refreshes
it when required by a display/settings change.
Fixes: QTBUG-73008
Change-Id: Ie604ba4034ad8041b971f5aa46bd43ae03decd55
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h index e8c30bd44b..b9b398b67b 100644 --- a/src/plugins/platforms/windows/qwindowswindow.h +++ b/src/plugins/platforms/windows/qwindowswindow.h @@ -297,6 +297,9 @@ public: void handleHidden(); void handleCompositionSettingsChanged(); + static void displayChanged(); + static void settingsChanged(); + static QScreen *forcedScreenForGLWindow(const QWindow *w); static QWindowsWindow *windowsWindowOf(const QWindow *w); static QWindow *topLevelOf(QWindow *w); static inline void *userDataOf(HWND hwnd); @@ -377,6 +380,8 @@ private: HICON m_iconBig = 0; void *m_surface = nullptr; + static bool m_screenForGLInitialized; + #if QT_CONFIG(vulkan) // note: intentionally not using void * in order to avoid breaking x86 VkSurfaceKHR m_vkSurface = 0; |