1// Copyright (C) 2020 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
4#ifndef QQUICKGRAPHICSCONFIGURATION_H
5#define QQUICKGRAPHICSCONFIGURATION_H
6
7#include <QtQuick/qtquickglobal.h>
8#include <QtCore/qbytearraylist.h>
9#include <QtCore/qdebug.h>
10
11QT_BEGIN_NAMESPACE
12
13class QQuickGraphicsConfigurationPrivate;
14
15class Q_QUICK_EXPORT QQuickGraphicsConfiguration
16{
17public:
18 QQuickGraphicsConfiguration();
19 ~QQuickGraphicsConfiguration();
20 QQuickGraphicsConfiguration(const QQuickGraphicsConfiguration &other);
21 QQuickGraphicsConfiguration &operator=(const QQuickGraphicsConfiguration &other);
22
23 static QByteArrayList preferredInstanceExtensions();
24
25 void setDeviceExtensions(const QByteArrayList &extensions);
26 QByteArrayList deviceExtensions() const;
27
28 void setDepthBufferFor2D(bool enable);
29 bool isDepthBufferEnabledFor2D() const;
30
31 void setDebugLayer(bool enable);
32 bool isDebugLayerEnabled() const;
33
34 void setDebugMarkers(bool enable);
35 bool isDebugMarkersEnabled() const;
36
37 void setTimestamps(bool enable);
38 bool timestampsEnabled() const;
39
40 void setPreferSoftwareDevice(bool enable);
41 bool prefersSoftwareDevice() const;
42
43 void setAutomaticPipelineCache(bool enable);
44 bool isAutomaticPipelineCacheEnabled() const;
45
46 void setPipelineCacheSaveFile(const QString &filename);
47 QString pipelineCacheSaveFile() const;
48
49 void setPipelineCacheLoadFile(const QString &filename);
50 QString pipelineCacheLoadFile() const;
51
52private:
53 void detach();
54 QQuickGraphicsConfigurationPrivate *d;
55 friend class QQuickGraphicsConfigurationPrivate;
56#ifndef QT_NO_DEBUG_STREAM
57 friend Q_QUICK_EXPORT QDebug operator<<(QDebug dbg, const QQuickGraphicsConfiguration &config);
58#endif
59};
60
61
62QT_END_NAMESPACE
63
64#endif // QQUICKGRAPHICSCONFIGURATION_H
65

source code of qtdeclarative/src/quick/items/qquickgraphicsconfiguration.h