Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgdepthstencilbuffer_p.h |
Switch to Source code | Preprocessed file |
Line | Source | Count |
---|---|---|
1 | - | |
2 | - | |
3 | - | |
4 | class QSGDepthStencilBufferManager; | - |
5 | - | |
6 | class QSGDepthStencilBuffer | - |
7 | { | - |
8 | public: | - |
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: m_format.size;return m_format.size; never executed: }return m_format.size; | 0 |
34 | int samples() const { return never executed: m_format.samples;return m_format.samples; never executed: }return m_format.samples; | 0 |
35 | Attachments attachments() const { return never executed: m_format.attachments;return m_format.attachments; never executed: }return m_format.attachments; | 0 |
36 | - | |
37 | protected: | - |
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 | - | |
49 | constexpr 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 | - | |
51 | inline bool QSGDepthStencilBuffer::Format::operator == (const Format &other) const | - |
52 | { | - |
53 | return executed 85 times by 5 tests: size == other.size && samples == other.samples && attachments == other.attachments;return size == other.size && samples == other.samples && attachments == other.attachments; Executed by:
executed 85 times by 5 tests: return size == other.size && samples == other.samples && attachments == other.attachments; Executed by:
| 85 |
54 | } | - |
55 | - | |
56 | - | |
57 | class QSGDefaultDepthStencilBuffer : public QSGDepthStencilBuffer | - |
58 | { | - |
59 | public: | - |
60 | QSGDefaultDepthStencilBuffer(QOpenGLContext *context, const Format &format); | - |
61 | virtual ~QSGDefaultDepthStencilBuffer(); | - |
62 | - | |
63 | protected: | - |
64 | void free() override; | - |
65 | }; | - |
66 | - | |
67 | - | |
68 | class QSGDepthStencilBufferManager | - |
69 | { | - |
70 | public: | - |
71 | QSGDepthStencilBufferManager(QOpenGLContext *ctx) : m_context(ctx) { } executed 57 times by 5 tests: end of block Executed by:
| 57 |
72 | ~QSGDepthStencilBufferManager(); | - |
73 | QOpenGLContext *context() const { return never executed: m_context;return m_context; never executed: }return m_context; | 0 |
74 | QSharedPointer<QSGDepthStencilBuffer> bufferForFormat(const QSGDepthStencilBuffer::Format &fmt); | - |
75 | void insertBuffer(const QSharedPointer<QSGDepthStencilBuffer> &buffer); | - |
76 | - | |
77 | private: | - |
78 | typedef QHash<QSGDepthStencilBuffer::Format, QWeakPointer<QSGDepthStencilBuffer> > Hash; | - |
79 | QOpenGLContext *m_context; | - |
80 | Hash m_buffers; | - |
81 | - | |
82 | friend class QSGDepthStencilBuffer; | - |
83 | }; | - |
84 | - | |
85 | extern uint qHash(const QSGDepthStencilBuffer::Format &format); | - |
86 | - | |
87 | - | |
Switch to Source code | Preprocessed file |