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
qeglfskmsintegration_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// Copyright (C) 2016 The Qt Company Ltd.
3// Copyright (C) 2016 Pelagicore AG
4// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
5
6#ifndef QEGLFSKMSINTEGRATION_H
7#define QEGLFSKMSINTEGRATION_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include "private/qeglfsdeviceintegration_p.h"
21#include <QtCore/QMap>
22#include <QtCore/QVariant>
23#include <QtCore/QLoggingCategory>
24
26
27class QKmsDevice;
29
30QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(qLcEglfsKmsDebug, Q_EGLFS_EXPORT)
31
32class Q_EGLFS_EXPORT QEglFSKmsIntegration : public QEglFSDeviceIntegration
33{
34public:
35 QEglFSKmsIntegration();
36 ~QEglFSKmsIntegration();
37
38 void platformInit() override;
39 void platformDestroy() override;
40 EGLNativeDisplayType platformDisplay() const override;
41 bool usesDefaultScreen() override;
42 void screenInit() override;
43 QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const override;
44 bool hasCapability(QPlatformIntegration::Capability cap) const override;
45 void waitForVSync(QPlatformSurface *surface) const override;
46 bool supportsPBuffers() const override;
47 void *nativeResourceForIntegration(const QByteArray &name) override;
48 void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
49
50 QKmsDevice *device() const;
51 QKmsScreenConfig *screenConfig() const;
52
53protected:
54 virtual QKmsDevice *createDevice() = 0;
55 virtual QKmsScreenConfig *createScreenConfig();
56
57 QKmsDevice *m_device;
58 QKmsScreenConfig *m_screenConfig = nullptr;
59};
60
61QT_END_NAMESPACE
62
63#endif
QEglFSKmsEventHost * eventHost()
RegisterWaitFlipEvent(void *key, QMutex *mutex, QWaitCondition *cond)
static const QEvent::Type TYPE
static QT_BEGIN_NAMESPACE void pageFlipHandler(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data)
QEglFSKmsEventHost::PendingFlipWait pendingFlipWaits[MAX_FLIPS]
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
void * completedFlips[MAX_FLIPS]
void handlePageFlipCompleted(void *key)