Debian Codegraph @

src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3 // Qt-Security score:significant reason:default
4
5 #pragma once
6
7 #include "qxcbglintegration.h"
8
9 QT_BEGIN_NAMESPACE
10
11 class QXcbNativeInterfaceHandler;
12
13 class QXcbGlxIntegration : public QXcbGlIntegration,
14 public QNativeInterface::Private::QGLXIntegration
15 {
16 public:
17 QXcbGlxIntegration();
18 ~QXcbGlxIntegration();
19
20 bool initialize(QXcbConnection *connection) override;
21 bool handleXcbEvent(xcb_generic_event_t *event, uint responseType) override;
22
23 QXcbWindow *createWindow(QWindow *window) const override;
24 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
25 QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
26 bool canCreatePlatformOffscreenSurface() const override;
27 QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const override;
28
29 bool supportsThreadedOpenGL() const override;
30 bool supportsSwitchableWidgetComposition() const override;
31
32 private:
33 QXcbConnection *m_connection;
34 uint32_t m_glx_first_event;
35
36 QScopedPointer<QXcbNativeInterfaceHandler> m_native_interface_handler;
37 };
38
39 QT_END_NAMESPACE