Commit Graph

54 Commits (2c7b1cf76206541fbebeeb19ab22a928895f1819)

Author SHA1 Message Date
Kai Uwe Broulik a7c396caeb [ScreenEdgeEffect] Create glow Svg on demand
Keeps it from loading the Svg and all the Plasma stuff (Theme etc) that comes with it on startup.

Differential Revision: https://phabricator.kde.org/D8011
2017-09-28 10:18:36 +02:00
Martin Gräßlin 8d9321ca4c [effects] Use shader traits api in screenedge effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin 3e007b5198 [effects] Disable more effects while screen is locked
Most of those effects didn't need special screen locking handling on
X11 as they prevented screen locking. On Wayland though, we don't
want the lock screen shown on a cube.

REVIEW: 126122
2015-11-26 08:30:29 +01:00
Martin Gräßlin 4a1bc2ec96 [effects] Drop the .desktop files for the BuiltIn Effects
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
2014-04-28 13:52:43 +02:00
l10n daemon script e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
l10n daemon script f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script 69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
Martin Gräßlin 4230a0d331 [effects] Get xcb_connection_t* and rootWindow through EffectsHandler API
So far the effects could just use the connection() and rootWindow()
provided by kwinglobals. Thus an internal detail from KWin core is
accessed directly.

To be more consistent with the rest of the API it's wrapped through the
EffectsHandler and with a convenient method in Effect.

The connection() is provided as xcbConnection() to free the very generic
name connection which could create confusion once we provide a wayland
connection to the Effects.

The rootWindow() is provided as x11RootWindow() to indicate that it is
for the X11 world.

REVIEW: 117597
2014-04-16 16:05:05 +02:00
l10n daemon script e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
Martin Gräßlin 3bbc9436db [kwin] Add a virtual Effect::requestedEffectChainPosition
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.

Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
2014-03-28 14:04:54 +01:00
l10n daemon script 4d9c6af719 SVN_SILENT made messages (.desktop file) 2014-03-14 07:37:21 +00:00
Martin Gräßlin c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
l10n daemon script 6f8c3dd771 SVN_SILENT made messages (.desktop file) 2014-02-18 05:12:30 +00:00
Martin Gräßlin 76efe517a7 Turn built-in effects into a library kwin links against
As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects

All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.

During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.

Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.

[1] QElapsedTimer around the loading code, start kwin five times, take
average.

REVIEW: 115073
2014-01-24 14:13:59 +01:00
Martin Gräßlin 57eb00977b ScreenEdge helper effect supports QPainter Compositing 2014-01-09 13:29:40 +01:00
l10n daemon script 8484628fd0 SVN_SILENT made messages (.desktop file) 2013-11-24 04:09:32 +00:00
Martin Gräßlin b7be3cb621 Better handling for making the compositing OpenGL context current
With QtQuick2 it's possible that the scene graph rendering context either
lives in an own thread or uses the main GUI thread. In the latter case
it's the same thread as our compositing OpenGL context lives in. This
means our basic assumption that between two rendering passes the context
stays current does not hold.

The code already ensured that before we start a rendering pass the
context is made current, but there are many more possible cases. If we
use OpenGL in areas not triggered by the rendering loop but in response
to other events the context needs to be made current. This includes the
loading and unloading of effects (some effects use OpenGL in the static
effect check, in the ctor and dtor), background loading of texture data,
lazy loading after first usage invoked by shortcut, etc. etc.

To properly handle these cases new methods are added to EffectsHandler
to make the compositing OpenGL context current. These calls delegate down
into the scene. On non-OpenGL scenes they are noop, but on OpenGL they go
into the backend and make the context current. In addition they ensure
that Qt doesn't think that it's QOpenGLContext is current by calling
doneCurrent() on the QOpenGLContext::currentContext(). This unfortunately
causes an additional call to makeCurrent with a null context, but there
is no other way to tell Qt - it doesn't notice when a different context
is made current with low level API calls. In the multi-threaded
architecture this doesn't matter as ::currentContext() returns null.

A short evaluation showed that a transition to QOpenGLContext doesn't
seem feasible. Qt only supports either GLX or EGL while KWin supports
both and when entering the transition phase for Wayland, it would become
extremely tricky if our native platform is X11, but we want a Wayland
EGL context. A future solution might be to have a "KWin-QPA plugin" which
uses either xcb or Wayland and hides everything from Qt.

The API documentation is extended to describe when the effects-framework
ensures that an OpenGL context is current. The effects are changed to
make the context current in cases where it's not guaranteed. This has
been done by looking for creation or deletion of GLTextures and Shaders.
If there are other OpenGL usages outside the rendering loop, ctor/dtor
this needs to be changed, too.
2013-11-23 10:54:41 +01:00
l10n daemon script 23fbf4395f SVN_SILENT made messages (.desktop file) 2013-10-09 04:14:36 +00:00
Martin Gräßlin 969e6b85e7 Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/client.cpp
	kwin/effects/highlightwindow/highlightwindow.cpp
	kwin/libkwineffects/kwingltexture.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/scene_opengl.cpp
	kwin/workspace.cpp
	plasma/desktop/applets/kickoff/CMakeLists.txt
	plasma/desktop/applets/taskmanager/package/contents/code/tools.js
	plasma/desktop/applets/taskmanager/package/contents/ui/Task.qml
	plasma/desktop/applets/taskmanager/package/contents/ui/main.qml
	plasma/desktop/applets/taskmanager/package/metadata.desktop
	plasma/desktop/applets/taskmanager/plugin/textlabel.h
	plasma/desktop/applets/tasks/CMakeLists.txt
	plasma/desktop/applets/tasks/package/metadata.desktop
	plasma/desktop/applets/tasks/tasks.cpp
	plasma/desktop/toolboxes/plasma-toolbox-desktoptoolbox.desktop
	plasma/generic/applets/activitybar/activitybar.cpp
	plasma/generic/wallpapers/color/plasma-wallpaper-color.desktop
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-09-24 11:28:38 +02:00
Martin Gräßlin 388944314a Drop QPixmap ctor of XRenderPicture
Was a todo to remove it as it's just using a toImage. Removing this
ctor should make it for the user more obvious that put image is used.
2013-08-13 09:57:50 +02:00
l10n daemon script df17849412 SVN_SILENT made messages (.desktop file) 2013-08-13 04:19:10 +00:00
Martin Gräßlin 9291b18cee Merge branch 'master' into frameworks-scratch
Conflicts:
	CMakeLists.txt
	kwin/effects.cpp
	kwin/effects/logout/logout.cpp
	kwin/effects/presentwindows/main.qml
	kwin/effects/presentwindows/presentwindows.cpp
	kwin/effects/presentwindows/presentwindows.h
	kwin/effects/zoom/zoom_config.cpp
	kwin/libkwineffects/kwinglutils_funcs.cpp
	kwin/libkwineffects/kwinxrenderutils.cpp
	kwin/nvidiahack.cpp
	kwin/xcbutils.h
	plasma/desktop/containments/desktop/plasma-containment-desktop.desktop
	plasma/generic/wallpapers/image/image.cpp
	plasma/generic/wallpapers/image/plasma-wallpaper-image.desktop
2013-08-07 10:10:06 +02:00
l10n daemon script ba0be05c78 SVN_SILENT made messages (.desktop file) 2013-08-04 04:29:45 +00:00
l10n daemon script 50dfc83d2e SVN_SILENT made messages (.desktop file) 2013-07-31 04:07:19 +00:00
l10n daemon script 68bf8072b2 SVN_SILENT made messages (.desktop file) 2013-07-30 04:11:51 +00:00
l10n daemon script 87a7569100 SVN_SILENT made messages (.desktop file) 2013-07-27 04:01:18 +00:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
l10n daemon script 467b772a90 SVN_SILENT made messages (.desktop file) 2013-07-21 04:08:51 +00:00
l10n daemon script 52461e5885 SVN_SILENT made messages (.desktop file) 2013-07-20 06:40:25 +00:00
l10n daemon script 205c557f89 SVN_SILENT made messages (.desktop file) 2013-07-05 03:48:50 +00:00
l10n daemon script 502d003ef5 SVN_SILENT made messages (.desktop file) 2013-06-23 04:02:47 +00:00
l10n daemon script a2e9957860 SVN_SILENT made messages (.desktop file) 2013-06-10 03:46:39 +00:00
l10n daemon script 34c8d6feb6 SVN_SILENT made messages (.desktop file) 2013-06-05 04:54:40 +00:00
l10n daemon script 020f6fd612 SVN_SILENT made messages (.desktop file) 2013-05-30 04:29:57 +00:00
l10n daemon script 3a0999688f SVN_SILENT made messages (.desktop file) 2013-05-24 03:35:07 +00:00
l10n daemon script a3b09b7ac4 SVN_SILENT made messages (.desktop file) 2013-05-22 03:36:01 +00:00
Script Kiddy 68ddc5f236 SVN_SILENT made messages (.desktop file) 2013-05-11 10:34:17 +02:00
Script Kiddy 71d0e363d3 SVN_SILENT made messages (.desktop file) 2013-04-22 09:03:09 +02:00
Script Kiddy f515789b02 SVN_SILENT made messages (.desktop file) 2013-04-14 08:37:06 +02:00
Script Kiddy 99ceff018a SVN_SILENT made messages (.desktop file) 2013-04-13 10:11:47 +02:00
Script Kiddy e793067ab6 SVN_SILENT made messages (.desktop file) 2013-04-08 09:00:12 +02:00
Script Kiddy ef0c9f3e94 SVN_SILENT made messages (.desktop file) 2013-03-30 09:40:36 +01:00
Script Kiddy 2515f30d6b SVN_SILENT made messages (.desktop file) 2013-03-19 16:40:02 +01:00
Martin Gräßlin b01f5684c5 Remove not needed includes from kwineffect header files
Only include what's actually needed in the headers. This causes of course
some additional needed includes in some implementation files.
2013-03-06 10:23:09 +01:00
Script Kiddy 787c572535 SVN_SILENT made messages (.desktop file) 2013-03-04 08:31:27 +01:00
Script Kiddy 83faa5f54b SVN_SILENT made messages (.desktop file) 2013-02-22 18:00:11 +01:00
Martin Gräßlin 7e10fe524f Fix warnings and compile errors when building with XRender Compositing disabled
ScreenEdgesEffect failed compiling, mouseclick and zoom are yelling
warnings.

Compiling is tested with XRender enabled, for the disabled test I need to
wait for my Jenkins installation ;-)
2013-02-21 18:21:46 +01:00
Martin Gräßlin 3d5f962566 XRender implementation for ScreenEdges Glow Effect
More or less straight forward port from OpenGL to XRender. There is one small difference:
the corners are not upscaled.

REVIEW: 108939
2013-02-18 09:21:43 +01:00
Script Kiddy 9af0232217 SVN_SILENT made messages (.desktop file) 2013-02-12 19:49:11 +01:00