Diffusion KWin f3805f739177

[wayland] Add support for cropped and scaled surfaces

Authored by zzag on May 23 2020, 6:19 PM.

Description

[wayland] Add support for cropped and scaled surfaces

The wp_viewporter compositor extension allows clients to crop and scale
their surfaces. It can be especially useful for applications wishing to
reduce their power consumption, e.g. video players, etc.

Given that there is no any direct relationship between the surface size
and the buffer size anymore, we have to use specialized helper methods
for converting coordinates from the surface-local space to buffer pixel
space and vice versa.