Commit Graph

60 Commits (6e7a249cd015dd1dccf7b11fad04af31a36fd098)

Author SHA1 Message Date
Martin Gräßlin 08b2aebd30 Merge branch 'KDE/4.7'
Conflicts:
	kwin/libkwineffects/kwinglutils.cpp
	kwin/libkwineffects/kwinglutils.h
2011-07-03 09:30:38 +02:00
Martin Gräßlin b837a3fca1 Render Shadow with only one GL texture
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
2011-07-03 09:24:28 +02:00
Martin Gräßlin c8daeef43c Remove (en|dis)able(Un)NormalizedTexCoords from GLTexture
Those are not used anymore as makeArrays only renders normalized
texCoords and also honors the y-Inverted case.
2011-06-26 09:15:31 +02:00
Arthur Arlt 25654f25b8 Removing TopMenu
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
2011-06-24 12:27:56 +02:00
Philipp Knechtges 116e024d12 kwin: moving KWin::GLTexture to a separate file 2011-06-22 13:03:36 +02:00
Michael Zanetti e1bf590a1c - fixes calculation of WindowMotionManager in case a new destination is set when the window is not at its original position and provide a function to check if windows
are currently moving (by Thomas Lübking)
- make use of new function and bugfix in SlideBack effect
2011-06-20 21:56:56 +02:00
Martin Gräßlin a05ad98896 Remove textureWidth/textureHeight from all Shaders
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
2011-06-19 20:54:13 +02:00
Thomas Lübking 3af7395ab8 avoid calling QPixmap::paintEngine() in scene rendering
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
2011-06-11 15:23:03 +02:00
Martin Gräßlin ae40bce25d Disable Shader Scene for LimitedGLSL GPUs
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
2011-06-01 18:25:45 +02:00
Martin Gräßlin 234ec644d2 KWin supports graphicssystem Raster
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
2011-05-12 18:52:38 +02:00
Martin Gräßlin 1dd614ee4b Improved detection of OpenGL software emulation
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
2011-05-06 18:16:38 +02:00
Fredrik Höglund e5ea420e96 kwin: Add an enabledByDefault() function to the effects interface
This makes it possible to decide at runtime if an effect should
be enabled by default.
2011-05-02 02:06:17 +02:00
Martin Gräßlin 5290e78106 Adding an option GLLegacy to force OpenGL 1
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.
2011-04-29 16:44:48 +02:00
Thomas Lübking 676d180e4f remove comments from commit 7da7090bc802a8b9d1ee0a969ea794921a74b86b 2011-04-28 21:43:13 +02:00
Thomas Lübking 48d8864090 remove QHash::operator[] from the motionmanager and sharpen the ::finish condiion
CCBUG: 252986
2011-04-28 14:34:45 +02:00
Martin Gräßlin 98cc15cfac Allow effects to render the outline 2011-04-28 13:49:22 +02:00
Martin Gräßlin 022d7a32a0 Remove binding of selection to styled EffectFrame
This allows to just set the selection on a None EffectFrame so
that only the selection is rendered without blurring the background
and so on.
2011-04-28 13:49:22 +02:00
Martin Gräßlin 77a7bedac8 Delete ShaderManger before destroying GL Context 2011-04-27 14:52:04 +02:00
Martin Gräßlin d647950ff0 Do not blur behind EffectFrames with no style 2011-04-27 14:52:04 +02:00
Jan Gerrit Marker 2407b0fbc4 Make present windows effect not preserve space for windows from other activities
REVIEW:101180
CCBUG:242555
2011-04-24 14:26:46 +02:00
Martin Gräßlin 12220a0d59 Initial implementation of new Shadows in KWin
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.
2011-03-27 12:33:07 +02:00
Martin Gräßlin b52975a57e Merge branch 'libkwineffects'
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
2011-03-16 19:46:59 +01:00
Martin Gräßlin ff4297a799 Update copyright
I really should start to add myself to the copyright when I commit
large chunks to the files...
2011-03-16 19:39:10 +01:00
Martin Gräßlin 6e7e1c530b Remove transformWindowDamage effects hook
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.
2011-03-15 20:38:37 +01:00
Martin Gräßlin 82b8f8d2fc Drop the driver blacklist
Let's face it: it was a bad idea and the blacklist never got updated.
2011-03-15 20:11:11 +01:00
Martin Gräßlin f213b7da70 Drop KWin::TimeLine from kwineffects
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.
2011-03-14 22:50:05 +01:00
Martin Gräßlin 6a8b57d40a Adjust documentation for Effect after removing the virtuals 2011-03-13 17:03:00 +01:00
Martin Gräßlin 2cf51238a8 kwineffects doesn't use kdecorations 2011-03-13 16:56:25 +01:00
Martin Gräßlin ca36f3e876 Remove unused forward declaration in kwineffects 2011-03-13 16:16:59 +01:00
Martin Gräßlin e5e5c4a020 Move push/popRenderTarget to kwingluitls
(De)Activating a FBO is OpenGL specific and does not belong into EffectsHandler.
2011-03-13 14:34:30 +01:00
Martin Gräßlin 16a025d907 Remove dynamic desktop layout
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.
2011-03-13 14:04:02 +01:00
Martin Gräßlin 9199619969 Remove not implemented add/delete desktop
It is unlikely that anyone will implement it and it is not compatible
to EWMH anyway. So better remove it.
2011-03-13 13:58:00 +01:00
Martin Gräßlin 32c903b05b Rework signals for move/resize windows
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.
2011-03-13 12:41:30 +01:00
Martin Gräßlin 909a678e13 New signal for maximize state changed
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.
2011-03-13 11:00:10 +01:00
Martin Gräßlin 640fdc7b6d PropertyNotify becomes a signal 2011-03-12 19:18:19 +01:00
Martin Gräßlin 88d50727ee WindowDamaged becomes a signal 2011-03-12 15:04:22 +01:00
Martin Gräßlin 39ab2cf29e MouseChanged becomes a signal 2011-03-12 14:37:30 +01:00
Martin Gräßlin 911098ee76 WindowGeometryShapeChanged becomes a signal 2011-03-12 12:34:59 +01:00
Thomas Lübking 0b1599680d stage one, call martin 2011-03-08 22:05:09 +01:00
Martin Gräßlin dcebc7481b ClientGroupItem* become signals
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.
2011-03-06 21:15:09 +01:00
Martin Gräßlin 747afb4225 NumberDesktopsChanged becomes a signal
TODO: connect DesktopChangeOSD also to the signal
2011-03-06 20:10:11 +01:00
Martin Gräßlin 15757e953a TabBox uses signals to notify the effects
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.
2011-03-06 12:15:16 +01:00
Martin Gräßlin a404ec4259 WindowUnminimized becomes a signal 2011-03-06 11:08:19 +01:00
Martin Gräßlin 012222037e WindowMinimized becomes a signal 2011-03-06 10:55:27 +01:00
Martin Gräßlin edd0950f96 WindowOpacityChanged becomes a signal 2011-03-06 10:30:23 +01:00
Martin Gräßlin a728823fbe Fix passing matrixes to the shaders
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
2011-03-06 09:13:31 +01:00
Martin Gräßlin eeb10c69d5 Signal for windowUserMovedResize
In core a new signal is added for maximizedState change of client.
Other function calls remain as direct calls for the moment.
2011-02-28 21:03:13 +01:00
Martin Gräßlin e355700e6e EffectsHandler emits windowDeleted signal
Workspace emits a deletedRemoved signal which the EffectsHandlerImpl translates
into a windowDeleted signal.
2011-02-27 10:47:42 +01:00
Martin Gräßlin 0795ae89ac EffectsHandler emits signal on windowActivated
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.
2011-02-27 10:05:04 +01:00
Martin Gräßlin 0b85768ec5 EffectsHandler emits windowClosed signal
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.
2011-02-27 09:25:45 +01:00