| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/plugins/platforms/eglfs/qeglfscontext.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display, | - | ||||||||||||
| 6 | EGLConfig *config, const QVariant &nativeHandle) | - | ||||||||||||
| 7 | : QEGLPlatformContext(format, share, display, config, nativeHandle, | - | ||||||||||||
| 8 | qt_egl_device_integration()->supportsSurfacelessContexts() ? Flags(0) : QEGLPlatformContext::NoSurfaceless), | - | ||||||||||||
| 9 | m_tempWindow(0) | - | ||||||||||||
| 10 | { | - | ||||||||||||
| 11 | } never executed: end of block | 0 | ||||||||||||
| 12 | - | |||||||||||||
| 13 | EGLSurface QEglFSContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface) | - | ||||||||||||
| 14 | { | - | ||||||||||||
| 15 | if (surface->surface()->surfaceClass() == QSurface::Window
| 0 | ||||||||||||
| 16 | return never executed: static_cast<QEglFSWindow *>(surface)->surface();return static_cast<QEglFSWindow *>(surface)->surface();never executed: return static_cast<QEglFSWindow *>(surface)->surface(); | 0 | ||||||||||||
| 17 | else | - | ||||||||||||
| 18 | return never executed: static_cast<QEGLPbuffer *>(surface)->pbuffer();return static_cast<QEGLPbuffer *>(surface)->pbuffer();never executed: return static_cast<QEGLPbuffer *>(surface)->pbuffer(); | 0 | ||||||||||||
| 19 | } | - | ||||||||||||
| 20 | - | |||||||||||||
| 21 | EGLSurface QEglFSContext::createTemporaryOffscreenSurface() | - | ||||||||||||
| 22 | { | - | ||||||||||||
| 23 | if (qt_egl_device_integration()->supportsPBuffers()
| 0 | ||||||||||||
| 24 | return never executed: QEGLPlatformContext::createTemporaryOffscreenSurface();return QEGLPlatformContext::createTemporaryOffscreenSurface();never executed: return QEGLPlatformContext::createTemporaryOffscreenSurface(); | 0 | ||||||||||||
| 25 | - | |||||||||||||
| 26 | if (!m_tempWindow
| 0 | ||||||||||||
| 27 | m_tempWindow = qt_egl_device_integration()->createNativeOffscreenWindow(format()); | - | ||||||||||||
| 28 | if (!m_tempWindow
| 0 | ||||||||||||
| 29 | QMessageLogger(__FILE__, 70, __PRETTY_FUNCTION__).warning("QEglFSContext: Failed to create temporary native window"); | - | ||||||||||||
| 30 | return never executed: ((EGLSurface)0);return ((EGLSurface)0);never executed: return ((EGLSurface)0); | 0 | ||||||||||||
| 31 | } | - | ||||||||||||
| 32 | } never executed: end of block | 0 | ||||||||||||
| 33 | EGLConfig config = q_configFromGLFormat(eglDisplay(), format()); | - | ||||||||||||
| 34 | return never executed: eglCreateWindowSurface(eglDisplay(), config, m_tempWindow, 0);return eglCreateWindowSurface(eglDisplay(), config, m_tempWindow, 0);never executed: return eglCreateWindowSurface(eglDisplay(), config, m_tempWindow, 0); | 0 | ||||||||||||
| 35 | } | - | ||||||||||||
| 36 | - | |||||||||||||
| 37 | void QEglFSContext::destroyTemporaryOffscreenSurface(EGLSurface surface) | - | ||||||||||||
| 38 | { | - | ||||||||||||
| 39 | if (qt_egl_device_integration()->supportsPBuffers()
| 0 | ||||||||||||
| 40 | QEGLPlatformContext::destroyTemporaryOffscreenSurface(surface); | - | ||||||||||||
| 41 | } never executed: else {end of block | 0 | ||||||||||||
| 42 | eglDestroySurface(eglDisplay(), surface); | - | ||||||||||||
| 43 | qt_egl_device_integration()->destroyNativeWindow(m_tempWindow); | - | ||||||||||||
| 44 | m_tempWindow = 0; | - | ||||||||||||
| 45 | } never executed: end of block | 0 | ||||||||||||
| 46 | } | - | ||||||||||||
| 47 | - | |||||||||||||
| 48 | void QEglFSContext::runGLChecks() | - | ||||||||||||
| 49 | { | - | ||||||||||||
| 50 | - | |||||||||||||
| 51 | - | |||||||||||||
| 52 | const char *renderer = reinterpret_cast<const char *>(glGetString(0x1F01)); | - | ||||||||||||
| 53 | - | |||||||||||||
| 54 | if (renderer
| 0 | ||||||||||||
| 55 | QMessageLogger(__FILE__, 96, __PRETTY_FUNCTION__).warning("Running on a software rasterizer (LLVMpipe), expect limited performance."); never executed: QMessageLogger(__FILE__, 96, __PRETTY_FUNCTION__).warning("Running on a software rasterizer (LLVMpipe), expect limited performance."); | 0 | ||||||||||||
| 56 | } never executed: end of block | 0 | ||||||||||||
| 57 | - | |||||||||||||
| 58 | void QEglFSContext::swapBuffers(QPlatformSurface *surface) | - | ||||||||||||
| 59 | { | - | ||||||||||||
| 60 | - | |||||||||||||
| 61 | if (surface->surface()->surfaceClass() == QSurface::Window
| 0 | ||||||||||||
| 62 | QPlatformWindow *window = static_cast<QPlatformWindow *>(surface); | - | ||||||||||||
| 63 | if (QEglFSCursor *cursor = qobject_cast<QEglFSCursor *>(window->screen()->cursor())
| 0 | ||||||||||||
| 64 | cursor->paintOnScreen(); never executed: cursor->paintOnScreen(); | 0 | ||||||||||||
| 65 | } never executed: end of block | 0 | ||||||||||||
| 66 | - | |||||||||||||
| 67 | qt_egl_device_integration()->waitForVSync(surface); | - | ||||||||||||
| 68 | QEGLPlatformContext::swapBuffers(surface); | - | ||||||||||||
| 69 | qt_egl_device_integration()->presentBuffer(surface); | - | ||||||||||||
| 70 | } never executed: end of block | 0 | ||||||||||||
| 71 | - | |||||||||||||
| 72 | - | |||||||||||||
| Switch to Source code | Preprocessed file |