Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #ifndef QQUICKFRAMEBUFFEROBJECT_H | - |
41 | #define QQUICKFRAMEBUFFEROBJECT_H | - |
42 | | - |
43 | #include <QtQuick/QQuickItem> | - |
44 | | - |
45 | QT_BEGIN_NAMESPACE | - |
46 | | - |
47 | | - |
48 | class QOpenGLFramebufferObject; | - |
49 | class QQuickFramebufferObjectPrivate; | - |
50 | class QSGFramebufferObjectNode; | - |
51 | | - |
52 | class Q_QUICK_EXPORT QQuickFramebufferObject : public QQuickItem | - |
53 | { | - |
54 | Q_OBJECT | - |
55 | Q_DECLARE_PRIVATE(QQuickFramebufferObject)executed 64 times by 1 test: return reinterpret_cast<QQuickFramebufferObjectPrivate *>(qGetPtrHelper(d_ptr)); Executed by:- tst_qquickframebufferobject
never executed: return reinterpret_cast<const QQuickFramebufferObjectPrivate *>(qGetPtrHelper(d_ptr)); | 0-64 |
56 | | - |
57 | Q_PROPERTY(bool textureFollowsItemSize READ textureFollowsItemSize WRITE setTextureFollowsItemSize NOTIFY textureFollowsItemSizeChanged) | - |
58 | Q_PROPERTY(bool mirrorVertically READ mirrorVertically WRITE setMirrorVertically NOTIFY mirrorVerticallyChanged) | - |
59 | | - |
60 | public: | - |
61 | | - |
62 | class Q_QUICK_EXPORT Renderer { | - |
63 | protected: | - |
64 | Renderer(); | - |
65 | virtual ~Renderer(); | - |
66 | virtual void render() = 0; | - |
67 | virtual QOpenGLFramebufferObject *createFramebufferObject(const QSize &size); | - |
68 | virtual void synchronize(QQuickFramebufferObject *); | - |
69 | QOpenGLFramebufferObject *framebufferObject() const; | - |
70 | void update(); | - |
71 | void invalidateFramebufferObject(); | - |
72 | private: | - |
73 | friend class QSGFramebufferObjectNode; | - |
74 | friend class QQuickFramebufferObject; | - |
75 | void *data; | - |
76 | }; | - |
77 | | - |
78 | QQuickFramebufferObject(QQuickItem *parent = nullptr); | - |
79 | | - |
80 | bool textureFollowsItemSize() const; | - |
81 | void setTextureFollowsItemSize(bool follows); | - |
82 | | - |
83 | bool mirrorVertically() const; | - |
84 | void setMirrorVertically(bool enable); | - |
85 | | - |
86 | virtual Renderer *createRenderer() const = 0; | - |
87 | | - |
88 | bool isTextureProvider() const override; | - |
89 | QSGTextureProvider *textureProvider() const override; | - |
90 | void releaseResources() override; | - |
91 | | - |
92 | protected: | - |
93 | void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; | - |
94 | | - |
95 | protected: | - |
96 | QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; | - |
97 | | - |
98 | Q_SIGNALS: | - |
99 | void textureFollowsItemSizeChanged(bool); | - |
100 | void mirrorVerticallyChanged(bool); | - |
101 | | - |
102 | private Q_SLOTS: | - |
103 | void invalidateSceneGraph(); | - |
104 | }; | - |
105 | | - |
106 | QT_END_NAMESPACE | - |
107 | | - |
108 | #endif // QQUICKFRAMEBUFFEROBJECT_H | - |
| | |