diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-02-26 16:52:14 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-03-01 20:41:29 +0100 |
commit | dc5a29b3246d19bd620acc9fdaea929bf856d8dc (patch) | |
tree | 72e9dd151722d6f6aad55b355d150ce3c9c511d2 /src/plugins/platforms/windows/qwindowswindow.cpp | |
parent | edc3feb07b0dd145fea008c24d2768ff5ca1d384 (diff) |
windows: Remove workaround for delayed OpenGL initialization
We no longer use QSurface::RasterGLSurface for composition, so the window
will already be QSurface::OpenGLSurface during WindowCreationData::initialize.
Pick-to: 6.7 6.6 6.5
Change-Id: I9b5ea0245ddf4a19d165bde9ad6fd48a98bfca4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowswindow.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 3b3f15610c..c2c093faf4 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -430,11 +430,7 @@ static inline bool windowIsAccelerated(const QWindow *w) { switch (w->surfaceType()) { case QSurface::OpenGLSurface: - return true; - case QSurface::RasterGLSurface: - return qt_window_private(const_cast<QWindow *>(w))->compositing; case QSurface::VulkanSurface: - return true; case QSurface::Direct3DSurface: return true; default: @@ -3442,24 +3438,6 @@ void QWindowsWindow::registerTouchWindow() qErrnoWarning("RegisterTouchWindow() failed for window '%s'.", qPrintable(window()->objectName())); } -void QWindowsWindow::aboutToMakeCurrent() -{ -#ifndef QT_NO_OPENGL - // For RasterGLSurface windows, that become OpenGL windows dynamically, it might be - // time to set up some GL specifics. This is particularly important for layered - // windows (WS_EX_LAYERED due to alpha > 0). - const bool isCompositing = qt_window_private(window())->compositing; - if (isCompositing != testFlag(Compositing)) { - if (isCompositing) - setFlag(Compositing); - else - clearFlag(Compositing); - - updateGLWindowSettings(window(), m_data.hwnd, m_data.flags, m_opacity); - } -#endif -} - void QWindowsWindow::setHasBorderInFullScreenStatic(QWindow *window, bool border) { if (QPlatformWindow *handle = window->handle()) |