plugins/screencast: Port away from Scene::Window::windowTexture()
Currently, when screencasting a window, kwin may render a window into a temporary offscreen texture, copy that offscreen texture to the dma-buf render target, and discard the offscreen texture.
Allocating and deallocating offscreen textures is inefficient. Another issue is that the screencast plugin uses Scene::Window::windowTexture(). It's a blocker for killing scene windows.
This change introduces a base ScreenCastSource type. It allows us to move away from Scene::Window::windowTexture() and make the dma-buf code path efficient with applications such as Firefox that utilize sub-surfaces.
With the ScreenCastSource, kwin can also provide screen cast frames with arbitrary device pixel ratio.
Edited by Vlad Zahorodnii