GLPlatform can recommend the compositor to use
author Martin Gräßlin
()
committer Martin Gräßlin
()
commit e1d7bfa55663e3fb017bd088c9292e134327d9ce
tree 5c01c9cdaf6724698d7f9e1c8940564db56e47f8
parent 733edd371822ec772ba8916a9b83f661bae7f2f3
GLPlatform can recommend the compositor to use

During detecting the OpenGL capabilities also a recommended compositor
can be set. This recommendation is honoured by the OpenGL based
compositors. That is the SceneOpenGL2 requires a recommendation for at
least OpenGL2 and the SceneOpenGL1 requires at least a recommendation for
OpenGL1. If the driver recommends XRender compositing the SceneOpenGL
performs the existing fallback to XRender.

With this recommendation the hacks in the Scene are removed, e.g. it is
no longer checked whether the driver is software emulation as that is
provided through the recommendation.

To overrule the recommendation the environment variable KWIN_COMPOSE is
extended by the values O1 and O2 to enforce either OpenGL 1 or OpenGL 2.
This overwrites all other checks. As a side-effect this allows now to run
KWin on the llvmpipe:
LIBGL_ALWAYS_SOFTWARE=1 KWIN_COMPOSE=O2 kwin --replace &

But not that I would recommend to use it :-)

REVIEW: 106741
kwin/libkwineffects/kwinglplatform.cpp
kwin/libkwineffects/kwinglplatform.h
kwin/scene_opengl.cpp