| 1 | // Copyright (C) 2017 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QWAYLANDSURFACEVIEW_P_H |
| 5 | #define QWAYLANDSURFACEVIEW_P_H |
| 6 | |
| 7 | #include "qwaylandview.h" |
| 8 | |
| 9 | #include <QtCore/QPoint> |
| 10 | #include <QtCore/QMutex> |
| 11 | #include <QtCore/private/qobject_p.h> |
| 12 | |
| 13 | #include <QtWaylandCompositor/QWaylandBufferRef> |
| 14 | |
| 15 | // |
| 16 | // W A R N I N G |
| 17 | // ------------- |
| 18 | // |
| 19 | // This file is not part of the Qt API. It exists purely as an |
| 20 | // implementation detail. This header file may change from version to |
| 21 | // version without notice, or even be removed. |
| 22 | // |
| 23 | // We mean it. |
| 24 | // |
| 25 | |
| 26 | QT_BEGIN_NAMESPACE |
| 27 | |
| 28 | class QWaylandSurface; |
| 29 | class QWaylandOutput; |
| 30 | |
| 31 | class QWaylandViewPrivate : public QObjectPrivate |
| 32 | { |
| 33 | Q_DECLARE_PUBLIC(QWaylandView) |
| 34 | public: |
| 35 | static QWaylandViewPrivate *get(QWaylandView *view) { return view->d_func(); } |
| 36 | |
| 37 | QWaylandViewPrivate() |
| 38 | { } |
| 39 | |
| 40 | void markSurfaceAsDestroyed(QWaylandSurface *surface); |
| 41 | void setSurface(QWaylandSurface *newSurface); |
| 42 | void clearFrontBuffer(); |
| 43 | |
| 44 | QObject *renderObject = nullptr; |
| 45 | QWaylandSurface *surface = nullptr; |
| 46 | QWaylandOutput *output = nullptr; |
| 47 | QPointF requestedPos; |
| 48 | QMutex bufferMutex; |
| 49 | QWaylandBufferRef currentBuffer; |
| 50 | QRegion currentDamage; |
| 51 | QWaylandBufferRef nextBuffer; |
| 52 | QRegion nextDamage; |
| 53 | bool nextBufferCommitted = false; |
| 54 | bool bufferLocked = false; |
| 55 | bool broadcastRequestedPositionChanged = false; |
| 56 | bool forceAdvanceSucceed = false; |
| 57 | bool allowDiscardFrontBuffer = false; |
| 58 | bool independentFrameCallback = false; //If frame callbacks are independent of the main quick scene graph |
| 59 | }; |
| 60 | |
| 61 | QT_END_NAMESPACE |
| 62 | |
| 63 | #endif /*QWAYLANDSURFACEVIEW_P_H*/ |
| 64 | |