D29131: [scene] Generate window quads for sub-surfaces
Vlad Zahorodnii
noreply at phabricator.kde.org
Thu Apr 23 14:35:37 BST 2020
zzag created this revision.
zzag added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
zzag requested review of this revision.
REVISION SUMMARY
No window quads are generated for sub-surfaces right now. This means that
effects that operate on window quads are not able to transform
sub-surfaces. Furthermore, the OpenGL scene needs window quads to clip
windows without using the scissor test.
The best (imho) way to render sub-surfaces would be with some help from a
scene graph. Unfortunately, KDE hasn't developed any scene graph
implementation that we could plug inti kwin and let the scene graph do
its magic. As a short term solution, this patch adjusts relevant parts of
the scene to make it generate window quads for sub-surfaces.
In order to build window quads, we traverse the current window pixmap
tree in DFS manner. When we enter a pixmap, we generate window quads. An
id is assigned to each quad that can be later used to match a list of
window quads against some particular window pixmap.
With the proposed change, no changes to effects are required. Effects see
window quads for sub-surfaces as regular WindowQuadContents quads.
Cross-fading is still kind of broken. In order to cross-fade between two
window pixmap trees, we need to render each tree in a texture, then
cross-fade between those two textures in a shader. Unfortunately, this is
not easy to do with the current design, so I only left a FIXME comment.
Although it should be pretty straightforward with a scene graph.
BUG: 387313
TEST PLAN
Enabled the wobbly windows effect, moved weston-subsurfaces
around on the screen.
REPOSITORY
R108 KWin
BRANCH
subsurface-quads
REVISION DETAIL
https://phabricator.kde.org/D29131
AFFECTED FILES
CMakeLists.txt
platformsupport/scenes/opengl/abstract_egl_backend.cpp
plugins/scenes/opengl/scene_opengl.cpp
plugins/scenes/opengl/scene_opengl.h
plugins/scenes/qpainter/scene_qpainter.cpp
plugins/scenes/qpainter/scene_qpainter.h
scene.cpp
scene.h
subsurfacemonitor.cpp
subsurfacemonitor.h
To: zzag, #kwin
Cc: kwin, Orage, cacarry, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, mkulinski, ragreen, jackyalcine, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, romangg, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20200423/99590a31/attachment.html>
More information about the kwin
mailing list