Changeset View
Changeset View
Standalone View
Standalone View
debug_console.cpp
Show All 16 Lines | |||||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "debug_console.h" | 20 | #include "debug_console.h" | ||
21 | #include "composite.h" | 21 | #include "composite.h" | ||
22 | #include "client.h" | 22 | #include "client.h" | ||
23 | #include "input_event.h" | 23 | #include "input_event.h" | ||
24 | #include "main.h" | 24 | #include "main.h" | ||
25 | #include "scene_opengl.h" | 25 | #include "scene.h" | ||
26 | #include "shell_client.h" | 26 | #include "shell_client.h" | ||
27 | #include "unmanaged.h" | 27 | #include "unmanaged.h" | ||
28 | #include "wayland_server.h" | 28 | #include "wayland_server.h" | ||
29 | #include "workspace.h" | 29 | #include "workspace.h" | ||
30 | #include "keyboard_input.h" | 30 | #include "keyboard_input.h" | ||
31 | #if HAVE_INPUT | 31 | #if HAVE_INPUT | ||
32 | #include "libinput/connection.h" | 32 | #include "libinput/connection.h" | ||
33 | #include "libinput/device.h" | 33 | #include "libinput/device.h" | ||
▲ Show 20 Lines • Show All 489 Lines • ▼ Show 20 Line(s) | 513 | { | |||
523 | m_ui->glRendererStringLabel->setText(QString::fromLocal8Bit(gl->glRendererString())); | 523 | m_ui->glRendererStringLabel->setText(QString::fromLocal8Bit(gl->glRendererString())); | ||
524 | m_ui->glVersionStringLabel->setText(QString::fromLocal8Bit(gl->glVersionString())); | 524 | m_ui->glVersionStringLabel->setText(QString::fromLocal8Bit(gl->glVersionString())); | ||
525 | m_ui->glslVersionStringLabel->setText(QString::fromLocal8Bit(gl->glShadingLanguageVersionString())); | 525 | m_ui->glslVersionStringLabel->setText(QString::fromLocal8Bit(gl->glShadingLanguageVersionString())); | ||
526 | m_ui->glDriverLabel->setText(GLPlatform::driverToString(gl->driver())); | 526 | m_ui->glDriverLabel->setText(GLPlatform::driverToString(gl->driver())); | ||
527 | m_ui->glGPULabel->setText(GLPlatform::chipClassToString(gl->chipClass())); | 527 | m_ui->glGPULabel->setText(GLPlatform::chipClassToString(gl->chipClass())); | ||
528 | m_ui->glVersionLabel->setText(GLPlatform::versionToString(gl->glVersion())); | 528 | m_ui->glVersionLabel->setText(GLPlatform::versionToString(gl->glVersion())); | ||
529 | m_ui->glslLabel->setText(GLPlatform::versionToString(gl->glslVersion())); | 529 | m_ui->glslLabel->setText(GLPlatform::versionToString(gl->glslVersion())); | ||
530 | 530 | | |||
531 | auto extensionsString = [] (const QList<QByteArray> &extensions) { | 531 | auto extensionsString = [] (const auto &extensions) { | ||
532 | QString text = QStringLiteral("<ul>"); | 532 | QString text = QStringLiteral("<ul>"); | ||
533 | for (auto extension : extensions) { | 533 | for (auto extension : extensions) { | ||
534 | text.append(QStringLiteral("<li>%1</li>").arg(QString::fromLocal8Bit(extension))); | 534 | text.append(QStringLiteral("<li>%1</li>").arg(QString::fromLocal8Bit(extension))); | ||
535 | } | 535 | } | ||
536 | text.append(QStringLiteral("</ul>")); | 536 | text.append(QStringLiteral("</ul>")); | ||
537 | return text; | 537 | return text; | ||
538 | }; | 538 | }; | ||
539 | 539 | | |||
540 | m_ui->platformExtensionsLabel->setText(extensionsString(static_cast<SceneOpenGL*>(Compositor::self()->scene())->backend()->extensions())); | 540 | m_ui->platformExtensionsLabel->setText(extensionsString(Compositor::self()->scene()->openGLPlatformInterfaceExtensions())); | ||
541 | m_ui->openGLExtensionsLabel->setText(extensionsString(openGLExtensions())); | 541 | m_ui->openGLExtensionsLabel->setText(extensionsString(openGLExtensions())); | ||
542 | } | 542 | } | ||
543 | 543 | | |||
544 | template <typename T> | 544 | template <typename T> | ||
545 | QString keymapComponentToString(xkb_keymap *map, const T &count, std::function<const char*(xkb_keymap*,T)> f) | 545 | QString keymapComponentToString(xkb_keymap *map, const T &count, std::function<const char*(xkb_keymap*,T)> f) | ||
546 | { | 546 | { | ||
547 | QString text = QStringLiteral("<ul>"); | 547 | QString text = QStringLiteral("<ul>"); | ||
548 | for (T i = 0; i < count; i++) { | 548 | for (T i = 0; i < count; i++) { | ||
▲ Show 20 Lines • Show All 961 Lines • Show Last 20 Lines |