Restrict available supported compositors based on first initialized one
ClosedPublic

Authored by graesslin on Feb 16 2019, 7:56 PM.

Details

Summary

On Wayland we cannot switch from OpenGL to QPainter compositor as this
would break any running OpenGL application. KWin registers it's
EGLDisplay to Wayland and without OpenGL this doesn't make sense any
more. We are not able to render OpenGL buffers in the QPainter
compositor.

While it's theoretically possible to switch from QPainter to OpenGL it
doesn't make any sense for the same reason. Any running OpenGL
application would be using llvmpipe and could not be switched to proper
OpenGL.

This change stores the selected compositing type in Platform and the
implementations can use it to restrict the supported compositors. On X11
we don't need this, all other Platforms implement the restriction. Thus
it's no longer possible to switch the backends at runtime.

Test Plan

Adjusted tests run, no runtime test as gui doesn't support
switching to QPainter anyway.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Feb 16 2019, 7:56 PM
Restricted Application added a project: KWin. · View Herald TranscriptFeb 16 2019, 7:56 PM
graesslin requested review of this revision.Feb 16 2019, 7:56 PM
zzag edited reviewers, added: KWin; removed: kwin.Feb 18 2019, 1:13 PM
Restricted Application added a subscriber: kwin. · View Herald TranscriptFeb 18 2019, 1:13 PM
zzag accepted this revision.Feb 18 2019, 1:54 PM
zzag added a subscriber: zzag.
zzag added inline comments.
platform.h
434

The link command should be ended with an endlink command, or just be enclosed in braces.

This revision is now accepted and ready to land.Feb 18 2019, 1:54 PM
This revision was automatically updated to reflect the committed changes.