9
9
#include " ui/gl/gl_shader.h"
10
10
#include " ui/integration.h"
11
11
#include " base/debug_log.h"
12
- #include " base/options.h"
13
12
#include " base/platform/base_platform_info.h"
14
13
15
14
#include < QtCore/QSet>
@@ -50,14 +49,6 @@ QList<QByteArray> EGLExtensions(not_null<QOpenGLContext*> context) {
50
49
}
51
50
#endif // DESKTOP_APP_USE_ANGLE
52
51
53
- base::options::toggle AllowX11NvidiaOpenGL ({
54
- .id = kOptionAllowX11NvidiaOpenGL ,
55
- .name = " Allow OpenGL on the NVIDIA drivers (X11)" ,
56
- .description = " Qt+OpenGL have problems on X11 with NVIDIA drivers." ,
57
- .scope = Platform::IsX11,
58
- .restartRequired = true ,
59
- });
60
-
61
52
void CrashCheckStart () {
62
53
auto f = QFile (Integration::Instance ().openglCheckFilePath ());
63
54
if (f.open (QIODevice::WriteOnly)) {
@@ -68,8 +59,6 @@ void CrashCheckStart() {
68
59
69
60
} // namespace
70
61
71
- const char kOptionAllowX11NvidiaOpenGL [] = " allow-linux-nvidia-opengl" ;
72
-
73
62
Capabilities CheckCapabilities (QWidget *widget) {
74
63
if (!Platform::IsMac ()) {
75
64
if (ForceDisabled) {
@@ -111,9 +100,8 @@ Capabilities CheckCapabilities(QWidget *widget) {
111
100
112
101
const auto context = tester.context ();
113
102
if (!context
114
- || !context->isValid ()/*
115
- // This check doesn't work for a widget with WA_NativeWindow.
116
- || !context->makeCurrent(tester.window()->windowHandle())*/ ) {
103
+ || !context->isValid ()
104
+ || !context->makeCurrent (tester.window ()->windowHandle ())) {
117
105
LOG_ONCE ((" OpenGL: Could not create widget in a window." ));
118
106
return {};
119
107
}
@@ -188,18 +176,6 @@ Capabilities CheckCapabilities(QWidget *widget) {
188
176
LOG ((" EGL Extensions: %1" ).arg (egllist.join (" , " )));
189
177
#endif // DESKTOP_APP_USE_ANGLE
190
178
191
- if (::Platform::IsX11 ()
192
- && version
193
- && QByteArray (version).contains (" NVIDIA" )) {
194
- // https://github.com/telegramdesktop/tdesktop/issues/16830
195
- if (AllowX11NvidiaOpenGL.value ()) {
196
- LOG_ONCE ((" OpenGL: Allow on NVIDIA driver (experimental)." ));
197
- } else {
198
- LOG_ONCE ((" OpenGL: Disable on NVIDIA driver on X11." ));
199
- return false ;
200
- }
201
- }
202
-
203
179
return true ;
204
180
}();
205
181
if (!checkVendor) {
0 commit comments