Simplifies the API. An FPx2 can be defined as a single real value
or a complex object with two real values:
{
value1: 1.0,
value2: 2.0
}
For a default ctor a null value can be used.
Scripted effects follow the Plamsoid package structure and the effect
loader recognizes a scripted effect at the according line in the desktop
file. If it is a scripted effect a different loader is used which
instantiates an object of the ScriptedEffect class. This class inherits
the AnimationEffect and exports the animate method and the EffectsHandler.
A few more getters for parsed information are added to GlPlatform.
This includes the driver information retrieved through glGetString
and information like direct rendering and loose binding.
Additionally the methods to convert version, driver and chipClass
to string are added to the public interface.
These changes allow parts outside GlPlatform to get the same debug
information about the GL system.
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
This patch changes the behavior of strictly bound textures such that
they are only updated if the corresponding window has been damaged.
Additionally GLTexture now keeps track of the current filter and
wrapmode setting.
REVIEW: 103655
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.
This patch reduces the number of QRegion and WindowQuadList operations
by drawing the opaque and translucent parts of the window within the
same bottom to top pass.
REVIEW: 103671
There seems to be a problem with nouveau GLES if you want to create an
EGLImageKHR more than once in a frame for the same pixmap. This patch
circumvents the problem in the way that it implements tfp the same way
as the mesa example in
mesa/demos/src/egl/opengles1/texture_from_pixmap.c does it. A nice
side effect of this is that it also avoids the overhead of recreating
the texture for every damaged window.
REVIEW: 103303
The EGL path had no support for presenting sub-regions of the screen, we can
leverage EGL_NV_post_sub_buffer for that. This wouldn't be a win if we didn't
have to opt-out of flipping.
REVIEW: 102889
EGL_KHR_image is a functional superset of both EGL_KHR_image_base and
EGL_KHR_image_pixmap, which were split off later to allow the former to be
more modular. Older drivers might only expose EGL_KHR_image if they were
released before the split happened.
REVIEW: 102879
Fixes rendering issues with R300 and similar GPUs. If the texture
uses GL_TEXTURE_RECTANGLE_ARB as target the tex coordinates need
to be adjusted. This at least fixes missing text on EffectFrames
with graphicssystem native on R300. Hopefully more issues are
resolved by the change.
BUG: 269576
CCBUG: 282882
FIXED-IN: 4.7.3
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
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
Additionally:
- hide the GLTexture implementation using dpointers
- drop the unused function SceneOpenGL::Texture::optimizeBindDamage()
- Texture::load now loads a new texture and does not update the existing one
REVIEW: 101999
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.
Building the workspaces requires to have all the build dependencies
which were required for KWIN_HAVE_COMPOSITING to be set. This allows
us to remove all the ifdefs for this and gives us a cleaner code.
BUG: 262543
pint desktop as background when including desktop in switcher
BUG: 262137
zoom windows as hover/selection indicaton (1/8 of the screen or 105%)
BUG: 215348
CCBUG: 175521
no closer on "show desktop" desktop
show closer immediately but have it disabled for a short time to allow the user realize it
REVIEW: 101318
if both the GLES and EGL libs and headers are found.
Fold all the includes and libraries into 1 varaible each and use those.
in other words, you need to have both OpenGLES and EGL to do a successful build.
Fixes a major regression which allowed OpenGL
compositing to be used with software rasterizer, which
either did not work or crashed directly.
Cherry-picked from cf2f572 in branch KDE/4.7.
All OpenGL related files are build as a kwinglutils library for OpenGL
and as a kwinglesutils library for OpenGL ES. The appropriate defines
are set using target_properties and removed from kwinconfig.h.cmake.
Removes the Extension::glxAvailable() from kwinglobals and
implements the functionality in CompositingPrefs, where it
is only needed. There used to be one additional check in
scene_opengl_glx.cpp which is moved into composite.cpp
before the OpenGL Scene is created.
REVIEW: 102002
I still don't understand how I actually tested my patch
before committing. It was working, sigh. That were
several hours of annoyance including a git bisect presenting
my own commit I assumed to be correct. Sigh.
If the environment variable KWIN_GL_DEBUG is set to 1
the define KWIN_SHADER_DEBUG is added to the glsl
source code allowing to add some custom ifdefed
visual debug handling.
As an example it's added to scene-fragment.glsl to
paint everything in a greenish way.
Construct window quads which will end on the screen instead of
rendering the windows several times and using scissoring to
restrict to the area which will end on screen.
REVIEW: 101765
Now convertToGLFormat does no longer mirror the texture, so that we can
avoid a deep copy in case we render a GL_BGRA texture on a little endian system.
REVIEW: 101739
Copies the shadow parts into one image and creates a GLTexture
from the image, so that we can render the complete shadow with
just one texture and one painting pass.
Should remove most of the overhead involved when rendering the new Shadows.
As a side effect this should fix missing shadows with non-NPOT GPUs and
a rendering glitch reported with NVIDIA.
REVIEW: 101742
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.
REVIEW: 101485
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
by checking the graphicssystem at startup
also avoid pixmap and memory leaking on the xrender backend, validate some pointers
on deletion in SceneOpnGL and avoid attempts to render ::isNull pixmaps
This was causing problems with R300G. The GPU supports only limited
GLSL and seems not to be up to rendering the scene appropriate. So
let's better disable the OpenGL 2 branch for such GPUs. If the user
really wants to use it, there is the GLES backend which does not
check for limited GLSL.
BUG: 274457
CCBUG: 274607
FIXED-IN: 4.7.0
With raster a QPixmap is no longer a XPixmap which fails all code
which assumes that an QPixmap is an XPixmap. Depending on were in
the codebase we either convert such pixmaps to images (OpenGL) or
create a XPixmap and use QPixmap::fromX11Pixmap to get a "real"
pixmap.
It is possible that there are more code pathes were we would need
a XPixmap. Currently tested is basic functionality of no-compositing,
XRender compositing, OpenGl/GLX and OpenGL ES/EGL compositing.
For OpenGL compositing raster might result in performance improvements,
for XRender it is possible that there are regressions when using raster.
By default KWin uses whatever is the default of the system, so we just
no longer enforce native.
Of course it is a bad idea to use graphicssystem OpenGL. As that
is broken anyways in Qt, we do not check for it.
Many thanks to Philipp Knechtges for bringing up the issue, convincing
me that we need it and providing most of the patch.
REVIEW: 101132
CCMAIL: Philipp.Knechtges@rwth-aachen.de
Adding a new method to retrieve whether the OpenGL implementation
uses any kind of software emulation and no software emulation can
provide GLSL support, even if it claims so.
Thanks to Maurel for testing again and again proposed patches.
BUG: 271166
Setting option "GLLegacy" to true in config group "Compositing"
will disable all GLSL shaders and kwin uses the legacy OpenGL 1
code pathes. Obviously the option is ignored with GLES.
As my Qt Designer is refusing to work, there is no GUI option yet.
For a complete documentation of new functionality refer to:
http://community.kde.org/KWin/Shadow
The current implementation includes a new Shadow class and Toplevel
holds a pointer to an instance of this class. The Shadow class reads
the data from the X11 Property. There is one extended class located
in SceneOpenGL to render the shadow.
Compositor is adjusted to include the shadow region into the painting
passes.
Implementation for XRender still missing and Shadow needs to respond
to size changes of the Toplevel to update cached shadow region and
WindowQuads.
The branch contains the first step in reworking the kwineffects
library. This includes:
* replacing virtuals by signals and slots
* dropping some unused methods
* remove KWin::TimeLine
More to come.
Conflicts:
kwin/workspace.cpp
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.
This has never been implemented properly. There is only the boolean
indicating that the desktop layout is dynamic but it is nowhere set
or used. So better remove it.
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.
The signal includes the state for horizontal and vertical maximize state.
It would be better to use the enum fro, KDecorationDefines but we don't want
to depend on decorations library.
Wobbly windows is adjusted to use this new signal - it is the only effect
interested in maximize state change.
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.
QMatrix4x4 accepts data in row-major order, but returns them in
column-major order, which is not documented and because of that
I expected them to be in row-major order.
This commit fixes it and rewrites the shaders to apply the matrix
multiplications in the right order.
REVIEW: 100759
EffectsHandlerImpl connects to the Workspace signal clientActivated.
The emitting of the signal is slightly moved from before the activation logic
to after the activation logic. This might change behavior in the scripting
component, but the previous code looked wrong.
Client and Unmanaged use a signal to notify that they are about to be closed.
The EffectsHandlerImpl is connected to those signals and emits the appropriate
windowClosed signal to which the effects are connected.
All previously existing windowAdded methods are renamed to slotWindowAdded.
EffectsHandlerImpl is connected to Workspace's clientAdded signal, which is
emitted a little bit earlier than the previous direct method call. This might
change behavior.
Another signal is added to Workspace to signal that an unmanaged is added.
The first signal used between EffectsHandler and Effects.
The signal is actually emitted by the EffectsHandlerImpl and only
the interested effects connect to this signal.
EffectsHandlerImpl itself is also notified by a signal from Workspace,
allowing to remove one of the many if (effects) checks.
Messages from kdecorations library are extracted to libkdecorations.pot.
Messages from kwineffects library are extracted to libkwineffects.pot.
Currently there are no messages yet in kwineffects, so it's for future use.
Second part of cleaning up the lib directory: the effects library
now lives in libkwineffects/ directory.
For existing effects nothing changes as the install path is unchanged.
The change obsoletes the lib/ directory.
As glplatform.h has not yet been exported I dared to export it and
adjust the places where it is used.
CCMAIL: kwin@kde.org