The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.
Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.
The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
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.
A CMake variable is used to specify the name of the binary.
By default this is "kwin" but building for PA changes the
name to "kwinactive". The variable adjusts all names, e.g.
kwinnvidiahack becomes kwinactivenvidiahack.
The remaining usage of kwinrc in core and libs is replaced
by a cmakedefine for the configuration name and all data
installations are moved to the defined name. Dynamic loading
for scripts & co is adjusted for loading based on defined name.
This change allows the side-by-side installation of both kwin
for desktop and kwin for Plasma Desktop without the known
issues like conflicts in config files or missing build options
if kwin desktop is used for Plasma Active.
Likewise the KCMs are not adjusted as they are not intended to
be used for kwinactive.
REVIEW: 104299
BUG: 296084
FIXED-IN: 4.9.0
CCMAIL: active@kde.org
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
Property invokes virtual methods returning false by default. Deleted
reimplements the isDeleted and returns true. Client returns true for
isClient. Method is not called isManaged as this is already used
inside Client.
If possible use the property to Toplevel or Client instead of the
pure virtual methods. This makes it easier to get a stable ABI.
Adding new methods to the class no longer requires to add a pure
virtual method.
From a performance point of view this change should not matter.
Most EffectWindow methods are not invoked during the repaint chain.
But only in response to an event like a window got added. There the
overhead does not really matter as well the previous implementation
made strong use of dynamic casts which are also not knwon for being
very fast.
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.
This change eliminates the hottest path inside KWin identified by
callgrind.
REVIEW: 102449
Due to changes in build system we have always either OpenGL or OpenGL ES.
This allows to remove the KWIN_HAVE_OPENGL_COMPOSITING define. In the
effects the define is kept as KWIN_HAVE_OPENGL which can be used in
future to build also an XRender only effect system.
The uniforms textureWidth and textureHeight were only needed for
normal windows. For everything else it was just 1.0/1.0, that is
normalized.
The makeArrays method is changed to produce normalized texcoords
obsoleting the need for these uniforms. So two uniforms less, one
calculation in vertex shaders less and many many lines of code
removed.
At the same time makeArrays is also adjusted to take care of
yInverted of the texture, which is needed as we no longer can use
the enableUnnormalizedTexCoords which did the yInverted transformation.
REVIEW: 101646
It is not used by any effect, so we save one complete go through
all effects pass on each window damage.
The functionality which could be provided by this hook can also be
implemented using the window damaged signal.
The KWin::TimeLine class was only a small wrapper around QTimeLine
without adding anything to QTimeLine what is not present in QTimeLine.
The initial idea was to make it possible to provide more curve shapes.
This is now obsoleted by Qt shipping more useful curves with QTimeLine.
So let's clean up a little bit and use QTimeLine directly instead of
the small wrapper.
All effects are adjusted to use QTimeLine directly.
First a signal is emitted when the user starts a move/resize operation.
During the move/resize operation each geometry change emits an update signal.
Last but not least a finish signal is emitted.
This eliminates the specific method for geometry updates in drawbound resize
mode.
This needs to be improved in core. Currently ClientGroup does not yet
emit signals, as it would be difficult to connect them. Nevertheless
the effects dependency should be removed.
EffectsHandlerImpl just forwards the signals from TabBox. In order
to have a valid pointer to the TabBox, the TabBox is now initialized
before compositing in Workspace.