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
backingstore.h
CMakeLists.txt
integration.cpp [plugins/qpa] Support SharingPlatformContext on the existing eglSurface and eglconfig 2016-07-20 14:17:11 +02:00
integration.h
kwin.json
main.cpp
nativeinterface.cpp
nativeinterface.h
platformcontextwayland.cpp
platformcontextwayland.h
platformcursor.cpp
platformcursor.h
screen.cpp
screen.h
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
window.h