OpenCoverage

qsgdepthstencilbuffer_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4class QSGDepthStencilBufferManager;-
5-
6class QSGDepthStencilBuffer-
7{-
8public:-
9 enum Attachment-
10 {-
11 NoAttachment = 0x00,-
12 DepthAttachment = 0x01,-
13 StencilAttachment = 0x02-
14 };-
15 typedef QFlags<Attachment> Attachments;-
16-
17 struct Format-
18 {-
19 QSize size;-
20 int samples;-
21 QSGDepthStencilBuffer::Attachments attachments;-
22 bool operator == (const Format &other) const;-
23 };-
24-
25 QSGDepthStencilBuffer(QOpenGLContext *context, const Format &format);-
26 virtual ~QSGDepthStencilBuffer();-
27-
28-
29 void attach();-
30-
31 void detach();-
32-
33 QSize size() const { return
never executed: return m_format.size;
m_format.size;
never executed: return m_format.size;
}
0
34 int samples() const { return
never executed: return m_format.samples;
m_format.samples;
never executed: return m_format.samples;
}
0
35 Attachments attachments() const { return
never executed: return m_format.attachments;
m_format.attachments;
never executed: return m_format.attachments;
}
0
36-
37protected:-
38 virtual void free() = 0;-
39-
40 QOpenGLExtensions m_functions;-
41 QSGDepthStencilBufferManager *m_manager;-
42 Format m_format;-
43 uint m_depthBuffer;-
44 uint m_stencilBuffer;-
45-
46 friend class QSGDepthStencilBufferManager;-
47};-
48-
49constexpr inline QFlags<QSGDepthStencilBuffer::Attachments::enum_type> operator|(QSGDepthStencilBuffer::Attachments::enum_type f1, QSGDepthStencilBuffer::Attachments::enum_type f2) noexcept { return QFlags<QSGDepthStencilBuffer::Attachments::enum_type>(f1) | f2; } constexpr inline QFlags<QSGDepthStencilBuffer::Attachments::enum_type> operator|(QSGDepthStencilBuffer::Attachments::enum_type f1, QFlags<QSGDepthStencilBuffer::Attachments::enum_type> f2) noexcept { return f2 | f1; } constexpr inline QIncompatibleFlag operator|(QSGDepthStencilBuffer::Attachments::enum_type f1, int f2) noexcept { return QIncompatibleFlag(int(f1) | f2); }-
50-
51inline bool QSGDepthStencilBuffer::Format::operator == (const Format &other) const-
52{-
53 return
executed 85 times by 5 tests: return size == other.size && samples == other.samples && attachments == other.attachments;
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
size == other.size && samples == other.samples && attachments == other.attachments;
executed 85 times by 5 tests: return size == other.size && samples == other.samples && attachments == other.attachments;
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
85
54}-
55-
56-
57class QSGDefaultDepthStencilBuffer : public QSGDepthStencilBuffer-
58{-
59public:-
60 QSGDefaultDepthStencilBuffer(QOpenGLContext *context, const Format &format);-
61 virtual ~QSGDefaultDepthStencilBuffer();-
62-
63protected:-
64 void free() override;-
65};-
66-
67-
68class QSGDepthStencilBufferManager-
69{-
70public:-
71 QSGDepthStencilBufferManager(QOpenGLContext *ctx) : m_context(ctx) { }
executed 57 times by 5 tests: end of block
Executed by:
  • tst_examples
  • tst_qquickcustomparticle
  • tst_qquickitem2
  • tst_qquickitemlayer
  • tst_qquicktext
57
72 ~QSGDepthStencilBufferManager();-
73 QOpenGLContext *context() const { return
never executed: return m_context;
m_context;
never executed: return m_context;
}
0
74 QSharedPointer<QSGDepthStencilBuffer> bufferForFormat(const QSGDepthStencilBuffer::Format &fmt);-
75 void insertBuffer(const QSharedPointer<QSGDepthStencilBuffer> &buffer);-
76-
77private:-
78 typedef QHash<QSGDepthStencilBuffer::Format, QWeakPointer<QSGDepthStencilBuffer> > Hash;-
79 QOpenGLContext *m_context;-
80 Hash m_buffers;-
81-
82 friend class QSGDepthStencilBuffer;-
83};-
84-
85extern uint qHash(const QSGDepthStencilBuffer::Format &format);-
86-
87-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0