Diffusion KWin 2b196bfa291a

Move the loadTexture for X11 pixmap functionality to the EglOnXBackend

Authored by graesslin on Jun 14 2016, 7:01 AM.

Description

Move the loadTexture for X11 pixmap functionality to the EglOnXBackend

Summary:
To use eglCreateImageKhr for an X11 pixmap we need an EGLDisplay created
for the same XDisplay as the X11 pixmap. This means if we created an
EGLDisplay for a GBM device, we are not allowed to load a texture from
the X11 pixmap and can result in a crash in the driver.

Similar in the nested X11 setup the EGLDisplay is created for the
rendering window, but the X11 pixmaps are from the Xwayland server KWin
started. They don't belong to the same windowing system.

This change addresses this problem by moving the loading of X11 pixmaps
from AbstractEglTexture to EglTexture of the EglOnX11Backend. Thus for
any usage on a non X11 platform we cannot hit the code path any more.
In addition the nested X11 platform can indicate that it doesn't support
it and thus also doesn't go through the code path.

Test Plan: Tested standalone and nested X11 platform

Reviewers: KWin, Plasma on Wayland

Subscribers: plasma-devel, kwin

Tags: Plasma on Wayland, KWin

Differential Revision: https://phabricator.kde.org/D1857