Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qeglfskmsgbmscreen_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 QEGLFSKMSGBMSCREEN_H
7#define QEGLFSKMSGBMSCREEN_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/qeglfskmsscreen_p.h>
21#include <QMutex>
22#include <QWaitCondition>
23
24#include <gbm.h>
25
27
29
31{
32public:
35
36 QPlatformCursor *cursor() const override;
37
38 gbm_surface *createSurface(EGLConfig eglConfig);
39 void resetSurface();
40
41 void initCloning(QPlatformScreen *screenThisScreenClones,
42 const QList<QPlatformScreen *> &screensCloningThisScreen);
43
44 void waitForFlip() override;
45
46 virtual void flip();
47 virtual void updateFlipStatus();
48
49 virtual uint32_t gbmFlags() { return GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING; }
50
51protected:
52 void flipFinished();
53 void ensureModeSet(uint32_t fb);
54 void cloneDestFlipFinished(QEglFSKmsGbmScreen *cloneDestScreen);
55 void waitForFlipWithEventReader(QEglFSKmsGbmScreen *screen);
56 static void nonThreadedPageFlipHandler(int fd,
57 unsigned int sequence,
58 unsigned int tv_sec,
59 unsigned int tv_usec,
60 void *user_data);
61
62 gbm_surface *m_gbm_surface;
63
67
71
72 QScopedPointer<QEglFSKmsGbmCursor> m_cursor;
73
74 struct FrameBuffer {
75 uint32_t fb = 0;
76 };
77 static void bufferDestroyedHandler(gbm_bo *bo, void *data);
78 FrameBuffer *framebufferForBufferObject(gbm_bo *bo);
79
83 bool cloneFlipPending = false;
84 };
85 QList<CloneDestination> m_cloneDests;
86
87 bool needsNewModeSetForNextFb = false;
88};
89
91
92#endif // QEGLFSKMSGBMSCREEN_H
IOBluetoothDevice * device
static QMutex m_nonThreadedFlipMutex
QEglFSKmsGbmScreen * m_cloneSource
virtual uint32_t gbmFlags()
QScopedPointer< QEglFSKmsGbmCursor > m_cursor
QList< CloneDestination > m_cloneDests
virtual void waitForFlip()
QPlatformCursor * cursor() const override
Reimplement this function in subclass to return the cursor of the screen.
\inmodule QtCore
Definition qmutex.h:281
The QPlatformCursor class provides information about pointer device events (movement,...
The QPlatformScreen class provides an abstraction for visual displays.
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void * user_data
#define Q_EGLFS_EXPORT
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint64 GLenum GLint fd
QScreen * screen
[1]
Definition main.cpp:29
QT_BEGIN_NAMESPACE typedef uchar * output