7#include <QtGui/private/qguiapplication_p.h>
17 static const QByteArray names[] = {
18 QByteArrayLiteral(
"egldisplay"),
19 QByteArrayLiteral(
"eglcontext"),
20 QByteArrayLiteral(
"eglconfig")
22 for (size_t i = 0; i <
sizeof(names) /
sizeof(names[0]); i++) {
27 if (key == QByteArrayLiteral(
"get_egl_context"))
30 return sizeof(names) /
sizeof(names[0]);
39 switch (resourceType(resource)) {
50 switch (resourceType(resource)) {
52 return eglContextForContext;
54 return eglConfigForContext;
63 switch (resourceType(resource)) {
65 return eglDisplayForWindow;
74 QXcbIntegration *integration = QXcbIntegration::instance();
75 QXcbEglIntegration *eglIntegration =
static_cast<QXcbEglIntegration *>(integration->connection()->glIntegration());
76 return eglIntegration->eglDisplay();
82 if (window->supportsOpenGL() && window->handle() ==
nullptr)
84 else if (window->supportsOpenGL())
85 return static_cast<
QXcbEglWindow *>(window->handle())->glIntegration()->eglDisplay();
92 Q_ASSERT(context->handle());
93 return static_cast<
QXcbEglContext *>(context->handle())->eglContext();
99 Q_ASSERT(context->handle());
100 return static_cast<
QXcbEglContext *>(context->handle())->eglConfig();
QPlatformNativeInterface::NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) const override
QXcbEglNativeInterfaceHandler(QXcbNativeInterface *nativeInterface)
QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const override
QPlatformNativeInterface::NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) const override
static QT_BEGIN_NAMESPACE int resourceType(const QByteArray &key)