Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qoffscreenintegration_x11.h
Go to the documentation of this file.
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#ifndef QOFFSCREENINTEGRATION_X11_H
6#define QOFFSCREENINTEGRATION_X11_H
7
10
11#include <qglobal.h>
12#include <qscopedpointer.h>
13
14#include <qpa/qplatformopenglcontext.h>
15#include <QtGui/qguiapplication.h>
16
17QT_BEGIN_NAMESPACE
18
19class QOffscreenX11Connection;
20class QOffscreenX11Info;
21
23#if QT_CONFIG(xcb)
25#endif
26{
27public:
30
31 void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
32#if !defined(QT_NO_OPENGL) && QT_CONFIG(xcb_glx_plugin)
34#endif
35#if QT_CONFIG(xcb)
36 Display *display() const override;
37 xcb_connection_t *connection() const override { return nullptr; }
38#endif
40};
41
43{
44public:
45 QOffscreenX11Integration(const QStringList& paramList);
47 bool hasCapability(QPlatformIntegration::Capability cap) const override;
48
49#if !defined(QT_NO_OPENGL) && QT_CONFIG(xcb_glx_plugin)
51#endif
53};
54
56public:
59
60 QOffscreenX11Info *x11Info();
61
62 void *display() const { return m_display; }
63 int screenNumber() const { return m_screenNumber; }
64
65private:
66 void *m_display;
67 int m_screenNumber;
68
69 QScopedPointer<QOffscreenX11Info> m_x11Info;
70};
71
72#if QT_CONFIG(xcb_glx_plugin)
73class QOffscreenX11GLXContextData;
74
75class QOffscreenX11GLXContext : public QPlatformOpenGLContext
76 , public QNativeInterface::QGLXContext
77{
78public:
79 QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGLContext *context);
80 ~QOffscreenX11GLXContext();
81
82 bool makeCurrent(QPlatformSurface *surface) override;
83 void doneCurrent() override;
84 void swapBuffers(QPlatformSurface *surface) override;
85 QFunctionPointer getProcAddress(const char *procName) override;
86
87 QSurfaceFormat format() const override;
88 bool isSharing() const override;
89 bool isValid() const override;
90
91 GLXContext nativeContext() const override { return glxContext(); }
92
93 void *glxConfig() const;
94 GLXContext glxContext() const;
95
96private:
97 QScopedPointer<QOffscreenX11GLXContextData> d;
98};
99#endif // QT_CONFIG(xcb_glx_plugin)
100
101QT_END_NAMESPACE
102
103#endif
QOffscreenPlatformNativeInterface(QOffscreenIntegration *integration)
bool hasCapability(QPlatformIntegration::Capability cap) const override
QOffscreenX11PlatformNativeInterface * nativeInterface() const override
QOffscreenX11Integration(const QStringList &paramList)
QOffscreenX11PlatformNativeInterface(QOffscreenIntegration *integration)
void * nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override
QScopedPointer< QOffscreenX11Connection > m_connection