8#include <QtGui/private/qeglconvenience_p.h>
12#ifndef EGL_EXT_platform_base
26 PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface =
nullptr;
27 const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
28 if (extensions && (strstr(extensions,
"EGL_KHR_platform_gbm") || strstr(extensions,
"EGL_MESA_platform_gbm"))) {
29 createPlatformWindowSurface =
reinterpret_cast<PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC
>(
30 eglGetProcAddress(
"eglCreatePlatformWindowSurfaceEXT"));
33 if (createPlatformWindowSurface) {
35#ifdef EGL_EXT_protected_content
38 contextAttributes.
append(EGL_PROTECTED_CONTENT_EXT);
39 contextAttributes.
append(EGL_TRUE);
40 qCDebug(qLcEglfsKmsDebug,
"Enabled EGL_PROTECTED_CONTENT_EXT for eglCreatePlatformWindowSurfaceEXT");
46 contextAttributes.
append(EGL_NONE);
50 qCDebug(qLcEglfsKmsDebug,
"No eglCreatePlatformWindowSurface for GBM, falling back to eglCreateWindowSurface");
static EGLConfig chooseConfig(EGLDisplay display, const QSurfaceFormat &format)
gbm_surface * createSurface(EGLConfig eglConfig)
void resetSurface() override
void invalidateSurface() override
Invalidates the window's surface by releasing its surface buffers.
QSurfaceFormat surfaceFormatFor(const QSurfaceFormat &inputFormat) const override
EGLDisplay display() const
void invalidateSurface() override
Invalidates the window's surface by releasing its surface buffers.
EGLNativeWindowType m_window
QEglFSScreen * screen() const override
const_pointer constData() const noexcept
void append(parameter_type t)
struct wl_display * display
Combined button and popup list for selecting options.
QSurfaceFormat q_glFormatFromConfig(EGLDisplay display, const EGLConfig config, const QSurfaceFormat &referenceFormat)
bool q_hasEglExtension(EGLDisplay display, const char *extensionName)
QT_BEGIN_NAMESPACE typedef EGLConfig void const EGLint * attrib_list
QT_BEGIN_NAMESPACE typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)(EGLDisplay dpy
QT_BEGIN_NAMESPACE typedef EGLConfig config
QT_BEGIN_NAMESPACE typedef EGLConfig void * native_window
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
#define qCDebug(category,...)