Instead of each effect, which needs to announce support, having custom
code to create a property and set it on the root window, there is now a
common API in EffectsHandler to take care of this.
The methods takes care of creating the atom if it has not already done
and set the property on the root window. Furthermore it allows multiple
effects to announce the same property without getting in conflict with
each other.
As a further convenience the property is automatically removed when the
effect is unloaded, so less things an effect author has to care about.
REVIEW: 107815
A decoration can provide the AbilityAnnounceAlphaChannel in addition to
AbilityUsesAlphaChannel. If this ability is provided the decoration can
enable/disable the use of the alpha channel through setAlphaEnabled().
The base idea behind this mechanism is to be able to tell the compositor
that currently alpha is not needed. An example is the maximized state in
which the decoration is fully opaque so that there is no need to use the
translucency code path which would render all windows behind the deco.
In addition also the blur effect honors this setting so that behind a
known opaque decoration no blurring is performed.
Oxygen is adjusted to disable translucency in maximized state and Aurorae
is adjusted to allow themes to enable/disable translucency. For Plastik
translucency and with that also blurring is disabled.
REVIEW: 106810
The logic has already ensured that the ARBBlurShader can only be used
when using the OpenGL1 compositor, the OpenGL 2 compositor needs to use
the GLSLBlurShader.
This change moves the complete ARBBlurShader into a KWIN_HAVE_OPENGL_1
ifdef section.
As a side-effect the ::create method can now return a NULL pointer which
makes more sense then returning an ARBBlurShader in case that the
GLSLShader is not supported.
REVIEW: 106738
If the build option is enabled KWIN_HAVE_OPENGL_1 is passed as a compile
flag when build against OpenGL.
This compile flag is meant to replace the KWIN_HAVE_OPENGLES. So far code
has been ifdefed for special behavior of OpenGL ES 2.0 and to remove
fixed functionality calls which are not available in OpenGL ES 2.0.
With this build flag the fixed functionality calls which are only used in
the OpenGL1 Compositor can be removed and keeping the KWIN_HAVE_OPENGLES
for the real differences between OpenGL 2.x and OpenGL ES 2.0.
E.g. a call like glColor4f should be in an
glColor4f(1.0, 1.0, 1.0, 1.0);
while a call like glPolygonMode should be in an
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
Building for OpenGL ES 2.0 of course implies that KWIN_HAVE_OPENGL_1 is
not defined.
Given that the Catalyst driver is now supporting direct rendering and by
that can use the OpenGL 2 code path we do no longer need to force
disable the Blur effect and Lanczos filters which used to crash in the
ARB shader path.
The ARB shader path - which can only be used in OpenGL 1 - is kept
disabled for Catalyst.
CCBUG: 270818
CCBUG: 286795
REVIEW: 106798
The main usage of ShaderManager::isValid was to have OpenGL2 specific
code pathes. Now we have an actual OpenGL2Compositing type and we know
that the ShaderManager is valid if we have this compositing type and we
know that it is not valid on OpenGL1Compositing. This gives us a much
better check and allows us to use the isValid method just for where we
want to check whether the shaders compiled successfully.
In addition some effects require OpenGL2, so we do not need to check
again that the ShaderManager is valid. Such usages are removed.
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur
All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.
REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
The public member variables for opacity, saturation and brightness
are removed in favor for getter and setters. The variables are
moved into a private class. Those are now qreal instead of double.
To make usage inside the effects easier a multiply method is added
which multiplies the current value with passed in factor and returns
the new value in a functional programming style.
This commit is the top-most of a patch series to refactor
ScreenPaintData and WindowPaintData. Other related commits are:
* 0811772
* ebdc7ec
* 2c8dd8d
* 7699726
* 68e0201
* 611cb09
REVIEW: 105141
BUG: 303314
FIXED-IN: 4.10
No effect has ever made use of contents opacity. Which means it
is not needed. Removing means faster effects as we used to
multiply the value (always 1.0) with the opacity in each frame
for each window.
This makes kwin in OpenGL2 mode more coherent with kwin_gles.
Despite some fullscreen effects they should now make the same
(pure) OpenGL calls.
REVIEW: 103804
This reduces the repaints in cases where several blur regions are
stacked on top of each other (e.g. oxygen-transparent) and the topmost
layer needs to be updated (e.g. a blurry window is moved).
The old blur version wrongly marked a cache region as valid with the
reason that this region would never become visible. It didnt matter
because the only case that this region could become visible was a
movement of the window on top, which back then would have forced a
workspace repaint of that region and as such would have invalidated
the cache anyway. With the introduction of addLayerRepaint the
last point is no longer true and we have to track the valid cache
regions more carefully.
This patch adds a new function Toplevel::addLayerRepaint, that in contrast
to addWorkspaceRepaint does not invalidate every blur texture cache that
overlaps with that region. As the name suggests it rather invalidates the
to the window associated layer at that position. This is especially useful
in the case of move/resize events in combination with oxygen-transparent,
where the altered window is almost always the topmost window and the blur
texture cache of the windows underneath are unchanged.
For the case of fully opaque windows the behaviour of addLayerRepaint
and addWorkspaceRepaint should be same.
REVIEW: 103906
Too many crash reports in the fglrx driver when using ARB shaders.
It's a pity to disable functionality for all fglrx users, but it's
better than crash reports.
Blur effect can still be enabled manually and Lanczos can still be
enabled through the environment variable.
REVIEW: 103556
CCBUG: 270818
CCBUG: 286795
Finally it is possible :-) If it causes an impact on performance
during the release candidates I'm going to revert.
REVIEW: 103375
BUG: 255106
FIXED-IN: 4.8.0
This fixes graphical glitches that appear next to the borders of plasma
tooltips. Additionally I added a variable that forces the effect to
drop the cache, which might be useful in the future to fix bugs.
This should fix 2 issues with the blur effect:
- It is now sufficient to have a damaged EXPANDED blurArea to trigger
an update of the caching texture.
- No glitches in cases where the taskbarthumbnail effect paints a
thumbnail of a blurred window.
CCBUG: 288568
This patch introduces some kind of damage propagation. In the old version of the blur effect
we had to repaint the whole window if sth behind the blurred area was damaged. The new texture
cache, which was introduced by the last patch, gives us the opportunity to only update parts of
blurred background texture. This means that the damaged area can only propagate with the speed
of the blurring radius per window layer.
REVIEW: 102665
This patch adds an optional texture cache to the blur effect such that damaged windows in
front of the blurred region dont trigger a repaint of the whole blurred region which pretty
often results in a avalanche repaint of nearly the whole screen.
REVIEW: 101977
This is actually a bloody hack by forcing the screen to be
repainted in each frame. This needs to be fixed in a different
way or we at least have to turn blur off by default for GLES in
the next release.
Optimize the region of the screen that's painted in each frame,
and paint the windows top-to-bottom when the damaged region doesn't
intersect any blurred areas.