kwin/plugins/qpa
Martin Gräßlin 44843f462f [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig
Summary:
So far SharingPlatformContext was only used if the OpenGL context
supports EGL_KHR_surfaceless_context. If not supported, KWin tried to
create a context through the Wayland API. Unfortunately on hwcomposer
platform this results in a crash as libhybris only supports the init
of EGLDisplay for one native platform.

This change tries to also use the SharingPlatformContext if there is
an OpenGL context in general. It reuses the native EGLSurface created
for the compositing scene and makes its own OpenGL context current on
that surface, too. As KWin creates an FBO, it never renders to it, so
it shouldn't matter at all.

In order to prevent EGL_BAD_MATCH errors when making Qt's OpenGL context
current also the EGLConfig from the scene is used to create the context.

Test Plan: Tested on Nexus5 with qtvirtualkeyboard in KWin

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2231
2016-07-20 14:17:11 +02:00
..
abstractplatformcontext.cpp [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
abstractplatformcontext.h [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
backingstore.cpp [wayland] Add a QPA plugin for kwin_wayland 2015-08-25 14:33:50 +02:00
backingstore.h [wayland] Add a QPA plugin for kwin_wayland 2015-08-25 14:33:50 +02:00
CMakeLists.txt [plugins/qpa] Add debug output for the KWin internal QPA plugin 2016-07-18 16:34:03 +02:00
integration.cpp [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
integration.h Integrate QtVirtualKeyboard into KWin/Wayland 2016-06-02 11:26:53 +02:00
kwin.json [wayland] Add a QPA plugin for kwin_wayland 2015-08-25 14:33:50 +02:00
main.cpp Maintenance - fixing naming typos 2016-02-09 17:20:12 +01:00
nativeinterface.cpp [plugins/qpa] Add a roundtrip platform function 2016-03-16 11:10:14 +01:00
nativeinterface.h [plugins/qpa] Add a roundtrip platform function 2016-03-16 11:10:14 +01:00
platformcontextwayland.cpp [wayland] Add a QPA plugin for kwin_wayland 2015-08-25 14:33:50 +02:00
platformcontextwayland.h [wayland] Add a QPA plugin for kwin_wayland 2015-08-25 14:33:50 +02:00
platformcursor.cpp [plugins/qpa] Implement a custom QPlatformCursor 2016-02-17 12:42:12 +01:00
platformcursor.h [plugins/qpa] Implement a custom QPlatformCursor 2016-02-17 12:42:12 +01:00
screen.cpp [plugins/qpa] Add support for QT_WAYLAND_FORCE_DPI env variable 2016-05-17 07:32:30 +02:00
screen.h [plugins/qpa] Add support for QT_WAYLAND_FORCE_DPI env variable 2016-05-17 07:32:30 +02:00
sharingplatformcontext.cpp [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
sharingplatformcontext.h [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
window.cpp [plugins/qpa] Add debug output for the KWin internal QPA plugin 2016-07-18 16:34:03 +02:00
window.h Make Wayland::EGL optional again 2015-12-01 07:58:47 +01:00