diff --git a/ui/gl/gl_detection.cpp b/ui/gl/gl_detection.cpp index df85a46f..634d879a 100644 --- a/ui/gl/gl_detection.cpp +++ b/ui/gl/gl_detection.cpp @@ -9,7 +9,6 @@ #include "ui/gl/gl_shader.h" #include "ui/integration.h" #include "base/debug_log.h" -#include "base/options.h" #include "base/platform/base_platform_info.h" #include @@ -37,14 +36,6 @@ bool LastCheckCrashed/* = false*/; ANGLE ResolvedANGLE/* = ANGLE::Auto*/; #endif // Q_OS_WIN -base::options::toggle AllowX11NvidiaOpenGL({ - .id = kOptionAllowX11NvidiaOpenGL, - .name = "Allow OpenGL on the NVIDIA drivers (X11)", - .description = "Qt+OpenGL have problems on X11 with NVIDIA drivers.", - .scope = Platform::IsX11, - .restartRequired = true, -}); - void CrashCheckStart() { auto f = QFile(Integration::Instance().openglCheckFilePath()); if (f.open(QIODevice::WriteOnly)) { @@ -55,8 +46,6 @@ void CrashCheckStart() { } // namespace -const char kOptionAllowX11NvidiaOpenGL[] = "allow-linux-nvidia-opengl"; - Capabilities CheckCapabilities(QWidget *widget) { if (!Platform::IsMac()) { if (ForceDisabled) { @@ -98,9 +87,8 @@ Capabilities CheckCapabilities(QWidget *widget) { const auto context = tester.context(); if (!context - || !context->isValid()/* - // This check doesn't work for a widget with WA_NativeWindow. - || !context->makeCurrent(tester.window()->windowHandle())*/) { + || !context->isValid() + || !context->makeCurrent(tester.window()->windowHandle())) { LOG_ONCE(("OpenGL: Could not create widget in a window.")); return {}; } @@ -175,18 +163,6 @@ Capabilities CheckCapabilities(QWidget *widget) { LOG(("EGL Extensions: %1").arg(egllist.join(", "))); #endif // Q_OS_WIN - if (::Platform::IsX11() - && version - && QByteArray(version).contains("NVIDIA")) { - // https://github.com/telegramdesktop/tdesktop/issues/16830 - if (AllowX11NvidiaOpenGL.value()) { - LOG_ONCE(("OpenGL: Allow on NVIDIA driver (experimental).")); - } else { - LOG_ONCE(("OpenGL: Disable on NVIDIA driver on X11.")); - return false; - } - } - return true; }(); if (!checkVendor) { diff --git a/ui/gl/gl_detection.h b/ui/gl/gl_detection.h index 070d3fdc..ae4a1a73 100644 --- a/ui/gl/gl_detection.h +++ b/ui/gl/gl_detection.h @@ -12,8 +12,6 @@ class QOpenGLContext; namespace Ui::GL { -extern const char kOptionAllowX11NvidiaOpenGL[]; - enum class Backend { Raster, OpenGL,