* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
capping shadows is seen as bug (and is ugly and
because of the non lanczos transition causes visual
flicker) so if the window+shadows extends the buffer,
lanczos is simply not possible.
BUG: 314838
FIXED-IN: 4.11
REVIEW: 111425
LanczosFilter tries to discard all cached textures in the timer event by
getting the stacking order and iterating over it. But this approach seems
wrong from several aspects.
First of all the xStackingOrder does not include Deleted windows. So if
a cached texture still exists on an EffectWindow for a Deleted it would
not be discarded.
Also the xStackingOrder could result in an update from X because the
stacking order is currently considered dirty.
Last but not least the EffectsHandler::stackingOrder creates a temporary
list of EffectWindows - good for Effects but not necessarily useful
inside KWin core.
Instead the LanczosFilter gets the list of Clients, desktops, unmanaged
and deleted and iterates over them to check whether there is a texture to
discard.
REVIEW: 109954
Since color correction got pushed merged in the Lanczos Filter is only
created for OpenGL2. Which means the complete ARB shader code path has
been dead since 4.10 anyway.
REVIEW: 108856
I don't like to do it, but it's better than users getting a bad
performance experience.
The change should be reverted once the issue is identified and fixed.
CCBUG: 313613
REVIEW: 109200
This was originally added by d467fc1bdbcf69bd6ef213bd909633c2edfb6878,
to prevent alpha ending up to be 0 with blending disabled. Apparently,
that was a driver issue that is no longer present.
REVIEW: 107090
Adjustment to reality. KWin has had a dependency on Mesa 8.0 for quite
some time given that it is what basically all distributions ship.
It is better to clearly state what is required. For KWin Mesa 8.0 is a
more reliable dependency as all DRI drivers which do not support DRI2
have been removed.
Packagers have been informed about this intended change some weeks ago.
REVIEW: 106799
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 ShaderBinder class can be used for the case that a block of code
should be executed with a given Shader being bound. This is useful for
all the cases where there is a if-block for OpenGL2 execution with a
Shader being pushed in the first line to the ShaderManager and popped in
the last line of the block. With the helper this can be simplified to:
ShaderBinder binder(myCustomShader);
or
ShaderBinder binder(ShaderManager::GenericShader);
The ctor of ShaderBinder pushes the given Shader to the stack and once
the helper goes out of scope it will be popped again from the stack.
In addition the helper can take care of OpenGL 1 compositing, that is it
just does nothing. So it can also be used where there is a shared OpenGL1
and OpenGL2 code path where the Shader should only be pushed in OpenGL2.
This basically removes all the checks for the compositing type before
pushing/popping a Shader to the stack.
REVIEW: 106521
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 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
For Sandybridge Lanczos Shader is enabled, but only GLSL is working
so the ARB variant has to be disabled for Intel GPUs.
BUG: 301729
FIXED-IN: 4.9.0
REVIEW: 105233
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
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
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.