summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2024-02-26 16:52:14 +0100
committerQt Cherry-pick Bot <[email protected]>2024-03-03 13:27:49 +0000
commit8540dd47a67c598d7d035965adb1d6b75154dcdf (patch)
tree877ec0f6880d9d2134f5c3b59408811e44e3752a
parent49d8452a784c331d5c1f16d4f56022e2336ccbb6 (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. Change-Id: I9b5ea0245ddf4a19d165bde9ad6fd48a98bfca4f Reviewed-by: Laszlo Agocs <[email protected]> Reviewed-by: Oliver Wolff <[email protected]> (cherry picked from commit dc5a29b3246d19bd620acc9fdaea929bf856d8dc) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit b3aa8fca210c9a2a1c228c48525ded2c23401a4e) (cherry picked from commit 3ccc2b2b5f0d53f0f20ede9192d74855ad00d3f1)
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp1
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp22
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h1
3 files changed, 0 insertions, 24 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 1d4e2f549c7..51541a5bc01 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -1262,7 +1262,6 @@ bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface)
// Do we already have a DC entry for that window?
auto *window = static_cast<QWindowsWindow *>(surface);
- window->aboutToMakeCurrent();
const HWND hwnd = window->handle();
if (const QOpenGLContextData *contextData = findByHWND(m_windowContexts, hwnd)) {
// Repeated calls to wglMakeCurrent when vsync is enabled in the driver will
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index 77803d076d0..b21ef874f88 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -429,11 +429,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:
@@ -3396,24 +3392,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())
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index af078487bf1..ff2d340507e 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -324,7 +324,6 @@ public:
void *surface(void *nativeConfig, int *err);
void invalidateSurface() override;
- void aboutToMakeCurrent();
void setAlertState(bool enabled) override;
bool isAlertState() const override { return testFlag(AlertState); }