The org_kde_kwin_outputdevice and respective org_kde_kwin_outputconfiguration
protocols will be extended by events to indicate the current replication and
clone status of an output device and a request to change the replication.
Here the notion of clones designate outputs sharing the same properties in an
immutable fahsion. This is mostly dependent on hardware characteristics when
outputs share a common CRTC. Changes to such an output will inevitably apply to
all its clones alike. The property is meant mainly to inform clients about
such a relation.
Replicas on the other side are arbitrary duplications of the image on an
output on other ones. This is an one-to-many relation allowing one output as
source of the image, also called the replication source, and arbitrary many
other outputs as replicas of the replicaiton source. It is expected that the
compositor has means to facilitate the replication in a sensible way, for
example by providing black bars to compensate for different aspect ratios.
Besides the protocol description changes and standard client API this patch
introduces on server side new functions and algorithms to make use of this
new interface in an efficient way:
- Logical position and size are cached values of the current position and size of the output in compositor space respecting the replication status.
- The cached clients-scale is the recommended scaling factor sent to clients on this output such that clients on the replication source and all replicas can provide buffers of optimal resolution. It is the ceiled maximum of all width and height quotients between replicas and replication source and the replication source scale itself. When an output is not a replica it always equals the ceiled scale value of the output.
- The view-geometry provides a recommended geometry, which is cached as well, of positioning the actual viewable area on the output in pixel-coordinates. Using this geometry the aspect ratio of the final image on every replica will be the same one as the one of the replication source. The geometry returned is a rectangle positioned at the origin with size equaling output's mode size when the output is not a replica.