kwin/plugins/platforms/x11/standalone
David Edmundson 40b0296d5c [libkwineffects] Introduce API to easily show a QtQuick scene in an effect
Summary:
EffectQuickView/Scene is a convenient class to render a QtQuick
scenegraph into an effect.

Current methods (such as present windows) involve creating an underlying
platform window which is expensive, causes a headache to filter out
again in the rest of the code, and only works as an overlay.

The new class exposes things more natively to an effect where we don't
mess with real windows, we can perform the painting anywhere in the view
and we don't have issues with hiding/closing.

QtQuick has both software and hardware accelerated modes, and kwin also
has 3 render backends. Every combination is supported.

* When used in OpenGL mode for both, we render into an FBO export the
texture ID then it's up to the effect to render that into a scene.

* When using software QtQuick rendering we blit into an image, upload
that into a KWinGLTexture which serves as an abstraction layer and
render that into the scene.

* When using GL for QtQuick and XRender/QPainter in kwin everything is
rendered into the internal FBO, blit and exported as an image.

* When using software rendering for both an image gets passed directly.

Mouse and keyboard events can be forwarded, only if the effect
intercepts them.

The class is meant to be generic enough that we can remove all the
QtQuick code from Aurorae.

The intention is also to replace EffectFrameImpl using this backend and
we can kill all of the EffectFrame code throughout the scenes.

The close button in present windows will also be ported to this,
simplifiying that code base.

Classes that handle the rendering and handling QML are intentionally
split so that in the future we can have a declarative effects API create
overlays from within the same context. Similar to how one can
instantiate windows from a typical QML scene.

Notes:
I don't like how I pass the kwin GL context from the backends into the
effect, but I need something that works with the library separation. It
also currently has wayland problem if I create a QOpenGLContext before
the QPA is set up with a scene - but I don't have anything better?

I know for the EffectFrame we need an API to push things through the
effects stack to handle blur/invert etc. Will deal with that when we
port the EffectFrame.

Test Plan: Used in an effect

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24215
2019-09-27 16:11:05 +01:00
..
CMakeLists.txt [libkwineffects] Introduce API to easily show a QtQuick scene in an effect 2019-09-27 16:11:05 +01:00
edge.cpp [platforms/x11] Fix incorrect screen edge approaching with switch desktop on window move 2017-07-06 19:12:28 +02:00
edge.h Use more traditional doxygen style 2019-07-29 22:06:19 +03:00
effects_mouse_interception_x11_filter.cpp Move X11-only specific part of EffectsHandlerImpl to x11 platform plugin 2017-10-16 16:54:17 +02:00
effects_mouse_interception_x11_filter.h Move X11-only specific part of EffectsHandlerImpl to x11 platform plugin 2017-10-16 16:54:17 +02:00
effects_x11.cpp [platforms/x11] Properly unload effects on X11 2019-03-11 09:23:24 +02:00
effects_x11.h [platforms/x11] Properly unload effects on X11 2019-03-11 09:23:24 +02:00
glx_context_attribute_builder.cpp [platforms/x11] Use a GlxContextAttributeBuilder 2017-08-19 11:34:51 +02:00
glx_context_attribute_builder.h [platforms/x11] Use a GlxContextAttributeBuilder 2017-08-19 11:34:51 +02:00
glxbackend.cpp [libkwineffects] Introduce API to easily show a QtQuick scene in an effect 2019-09-27 16:11:05 +01:00
glxbackend.h Split Compositor class in Wayland and X11 child classes 2019-08-07 21:06:53 +02:00
logging.cpp [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
logging.h [plugins/platforms] Dedicated logging category for X11 standalone platform 2016-04-12 14:48:54 +02:00
non_composited_outline.cpp Move NonComposited Outline into the X11 standalone platform 2017-09-01 17:07:23 +02:00
non_composited_outline.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
overlaywindow_x11.cpp Use nullptr everywhere 2019-09-19 17:48:21 +03:00
overlaywindow_x11.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
screenedges_filter.cpp Move X11 specific event filtering for ScreenEdges into x11 standalone platform 2017-09-01 17:01:01 +02:00
screenedges_filter.h Move X11 specific event filtering for ScreenEdges into x11 standalone platform 2017-09-01 17:01:01 +02:00
screens_xrandr.cpp Split Compositor class in Wayland and X11 child classes 2019-08-07 21:06:53 +02:00
screens_xrandr.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
sync_filter.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
sync_filter.h Create a dedicated X11Filter for Client sync events and move it to X11 platform 2017-10-19 19:56:58 +02:00
windowselector.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
windowselector.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
x11.json SVN_SILENT made messages (.desktop file) - always resolve ours 2019-07-23 05:20:30 +02:00
x11_decoration_renderer.cpp Rename Client to X11Client 2019-09-25 21:11:37 +03:00
x11_decoration_renderer.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
x11_output.cpp Backport Night Color feature to X11 2019-06-17 12:09:04 +03:00
x11_output.h [platforms/x11] Delete duplicate doxygen comments in X11Output 2019-08-28 12:06:56 +03:00
x11_platform.cpp [platforms/x11/standalone] Fix stored refresh rate 2019-08-20 14:02:43 +02:00
x11_platform.h Use more traditional doxygen style 2019-07-29 22:06:19 +03:00
x11cursor.cpp Set specific edge cursor shape when resizing 2018-06-11 10:05:07 +01:00
x11cursor.h Use more traditional doxygen style 2019-07-29 22:06:19 +03:00
xfixes_cursor_event_filter.cpp Move XFixes cursor change tracking into the x11 standalone platform 2017-09-30 12:58:17 +02:00
xfixes_cursor_event_filter.h Move XFixes cursor change tracking into the x11 standalone platform 2017-09-30 12:58:17 +02:00
xinputintegration.cpp Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00
xinputintegration.h Run clang-tidy with modernize-use-override check 2019-07-22 20:03:22 +03:00