99#include " ui/gl/gl_shader.h"
1010#include " ui/integration.h"
1111#include " base/debug_log.h"
12- #include " base/options.h"
1312#include " base/platform/base_platform_info.h"
1413
1514#include < QtCore/QSet>
@@ -37,14 +36,6 @@ bool LastCheckCrashed/* = false*/;
3736ANGLE ResolvedANGLE/* = ANGLE::Auto*/ ;
3837#endif // Q_OS_WIN
3938
40- base::options::toggle AllowX11NvidiaOpenGL ({
41- .id = kOptionAllowX11NvidiaOpenGL ,
42- .name = " Allow OpenGL on the NVIDIA drivers (X11)" ,
43- .description = " Qt+OpenGL have problems on X11 with NVIDIA drivers." ,
44- .scope = Platform::IsX11,
45- .restartRequired = true ,
46- });
47-
4839void CrashCheckStart () {
4940 auto f = QFile (Integration::Instance ().openglCheckFilePath ());
5041 if (f.open (QIODevice::WriteOnly)) {
@@ -55,8 +46,6 @@ void CrashCheckStart() {
5546
5647} // namespace
5748
58- const char kOptionAllowX11NvidiaOpenGL [] = " allow-linux-nvidia-opengl" ;
59-
6049Capabilities CheckCapabilities (QWidget *widget) {
6150 if (!Platform::IsMac ()) {
6251 if (ForceDisabled) {
@@ -98,9 +87,8 @@ Capabilities CheckCapabilities(QWidget *widget) {
9887
9988 const auto context = tester.context ();
10089 if (!context
101- || !context->isValid ()/*
102- // This check doesn't work for a widget with WA_NativeWindow.
103- || !context->makeCurrent(tester.window()->windowHandle())*/ ) {
90+ || !context->isValid ()
91+ || !context->makeCurrent (tester.window ()->windowHandle ())) {
10492 LOG_ONCE ((" OpenGL: Could not create widget in a window." ));
10593 return {};
10694 }
@@ -175,18 +163,6 @@ Capabilities CheckCapabilities(QWidget *widget) {
175163 LOG ((" EGL Extensions: %1" ).arg (egllist.join (" , " )));
176164#endif // Q_OS_WIN
177165
178- if (::Platform::IsX11 ()
179- && version
180- && QByteArray (version).contains (" NVIDIA" )) {
181- // https://github.com/telegramdesktop/tdesktop/issues/16830
182- if (AllowX11NvidiaOpenGL.value ()) {
183- LOG_ONCE ((" OpenGL: Allow on NVIDIA driver (experimental)." ));
184- } else {
185- LOG_ONCE ((" OpenGL: Disable on NVIDIA driver on X11." ));
186- return false ;
187- }
188- }
189-
190166 return true ;
191167 }();
192168 if (!checkVendor) {
0 commit comments