Line | Source | Count |
1 | | - |
2 | | - |
3 | QEGLPbuffer::QEGLPbuffer(EGLDisplay display, const QSurfaceFormat &format, QOffscreenSurface *offscreenSurface, | - |
4 | QEGLPlatformContext::Flags flags) | - |
5 | : QPlatformOffscreenSurface(offscreenSurface) | - |
6 | , m_format(format) | - |
7 | , m_display(display) | - |
8 | , m_pbuffer(((EGLSurface)0)) | - |
9 | { | - |
10 | bool hasSurfaceless = !flags.testFlag(QEGLPlatformContext::NoSurfaceless)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
11 | && q_hasEglExtension(display, "EGL_KHR_surfaceless_context")TRUE | never evaluated | FALSE | never evaluated |
; | 0 |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | const char *vendor = eglQueryString(display, 0x3053); | - |
19 | if (vendorTRUE | never evaluated | FALSE | never evaluated |
&& strstr(vendor, "Mesa")TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
20 | hasSurfaceless = false; never executed: hasSurfaceless = false; | 0 |
21 | | - |
22 | if (hasSurfacelessTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
23 | return; never executed: return; | 0 |
24 | | - |
25 | EGLConfig config = q_configFromGLFormat(m_display, m_format, false, 0x0001); | - |
26 | | - |
27 | if (configTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
28 | const EGLint attributes[] = { | - |
29 | 0x3057, offscreenSurface->size().width(), | - |
30 | 0x3056, offscreenSurface->size().height(), | - |
31 | 0x3058, 0, | - |
32 | 0x3038 | - |
33 | }; | - |
34 | | - |
35 | m_pbuffer = eglCreatePbufferSurface(m_display, config, attributes); | - |
36 | | - |
37 | if (m_pbuffer != ((EGLSurface)0)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
38 | m_format = q_glFormatFromConfig(m_display, config); never executed: m_format = q_glFormatFromConfig(m_display, config); | 0 |
39 | } never executed: end of block | 0 |
40 | } never executed: end of block | 0 |
41 | | - |
42 | QEGLPbuffer::~QEGLPbuffer() | - |
43 | { | - |
44 | if (m_pbuffer != ((EGLSurface)0)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
45 | eglDestroySurface(m_display, m_pbuffer); never executed: eglDestroySurface(m_display, m_pbuffer); | 0 |
46 | } never executed: end of block | 0 |
47 | | - |
48 | | - |
| | |