Commit graph

134 commits

Author SHA1 Message Date
Martin Gräßlin
90365e27d0 Merge branch 'KDE/4.9'
Conflicts:
	khotkeys/data/kde32b1.khotkeys
	kinfocenter/Modules/opengl/opengl.desktop
	kwin/tabbox/tests/CMakeLists.txt
	plasma/generic/applets/system-monitor/plasma-applet-sm_hdd_activity.desktop
2012-08-17 17:59:49 +02:00
Martin Gräßlin
23f2de009b Effects can provide support information through properties
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
2012-08-17 17:49:49 +02:00
Martin Gräßlin
c7262e8bd3 Getter/setters for opacity, saturation and brightness in WindowPaintData
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
2012-07-19 18:25:48 +02:00
Martin Gräßlin
f723f132ca Drop support for explicit contents opacity from WindowPaintData
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.
2012-07-19 18:25:03 +02:00
Martin Gräßlin
a2b0d42916 Replace translation by QVector3D in Screen/Window PaintData 2012-07-19 18:25:03 +02:00
Martin Gräßlin
0eff12eb92 Use QGraphicsScale for scale information in ScreenPaintData 2012-07-19 18:25:03 +02:00
Script Kiddy
953d088b6a SVN_SILENT made messages (.desktop file) 2012-06-12 17:07:51 +02:00
Martin Gräßlin
d0d274b855 Don't compare uint with int
Explicitly cast uint to int to fix a warning.
2012-05-27 16:35:04 +02:00
Martin Gräßlin
812c310dcf Fix unused variable warnings
SVN_SILENT
2012-05-27 16:35:04 +02:00
Martin Gräßlin
d14cf2da92 Show detailed information why an effect cannot be loaded
Effects can specify their minimum requirements in their
desktop file:
* OpenGL
* OpenGL 2 (GLSL required)
* Shaders (either ARB or OpenGL 2)

The configuration module uses this information in combination
with which backend KWin is currently using. So if e.g. OpenGL
is used and an effect requires OpenGL 2 a detailed error
message can be showed that OpenGL 2 is required.

BUG: 209213
FIXED-IN: 4.9.0
REVIEW: 104847
2012-05-15 18:02:57 +02:00
Philipp Knechtges
93b2674313 kwin: dropping several gl(Push|Pop)(Attrib|Matrix) calls
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
2012-04-19 21:01:46 +02:00
Martin Gräßlin
2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00
Philipp Knechtges
999d64bb19 kwin/blur: consider the valid part of the cache as being opaque
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).
2012-02-19 01:28:23 +01:00
Philipp Knechtges
f3117f1038 kwin/blur: substituting QHash::operator[] by an iterator-based approach 2012-02-19 01:28:16 +01:00
Philipp Knechtges
2bfcfeceb4 kwin: fixing blur bug for move/resize events
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.
2012-02-16 22:13:08 +01:00
Philipp Knechtges
239d5757f2 kwin: move/resize events shall not force a repaint of all layers
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
2012-02-12 16:57:12 +01:00
Martin Gräßlin
05cd97c746 Enable Blur by default for SandyBridge
REVIEW: 103852
2012-02-04 11:25:16 +01:00
Thomas Lübking
d845b60c6c change geometry w/o compositor restart
This possibly fails on some (older?) ati chip/driver combos
-> Waiting for bugreports

REVIEW: 103246
2012-01-24 22:27:15 +01:00
Philipp Knechtges
c8fbb4ec61 kwin/blur: use already existing texture instead of allocating a new one 2012-01-08 17:23:36 +01:00
Martin Gräßlin
f135206781 Disable Lanczos and Blur for fglrx
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
2011-12-31 08:54:15 +01:00
Martin Gräßlin
544c4d60b5 Blur behind sliding popups
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
2011-12-10 22:41:35 +01:00
Philipp Knechtges
3065e6afce kwin/blur: add a proper initialization of the texture cache
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.
2011-12-10 17:35:02 +01:00
Philipp Knechtges
1023d3b08e kwin: fixing some blur 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
2011-12-10 12:39:51 +01:00
Philipp Knechtges
1ea54ef44f kwin: fixing blur for shaded windows
If a window is "rolled" up we should not blur the specific regions.

CCBUG: 245388
2011-10-15 16:32:13 +02:00
Martin Gräßlin
15fc864c95 Drop GLES specific hack in blur effect
With GLES full repaints are no longer required. At least I can no
longer notice any visual issues.
2011-10-15 10:55:27 +02:00
Philipp Knechtges
5c7f919bbf kwin: updating comments on the blur texture cache 2011-10-12 16:02:19 +02:00
Philipp Knechtges
b6c27a17b0 kwin: bugfix blur effect
This commit fixes the bug, that the blur texture cache is not marked invalid
when the related XProperty changes.

BUG: 283818
2011-10-12 15:16:46 +02:00
Philipp Knechtges
b6478e1b12 kwin: Optimizing Blur Part III
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
2011-10-02 14:47:03 +02:00
Philipp Knechtges
ef9aeafe0d kwin: Optimizing Blur Part II
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
2011-09-18 02:01:31 +02:00
Martin Gräßlin
fcbd22ad36 Workaround repaint issue in blur effect with GLES
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.
2011-09-17 20:01:59 +02:00
Script Kiddy
4cbbf921d4 SVN_SILENT made messages (.desktop file) 2011-09-09 09:21:44 +02:00
Script Kiddy
157f51ce85 SVN_SILENT made messages (.desktop file) 2011-09-08 09:04:13 +02:00
Martin Gräßlin
31386d2f25 Drop unused variables
SVN_SILENT
2011-08-31 17:55:04 +02:00
Martin Gräßlin
f72f465c13 Fix Typos
Krazy--
SVN_SILENT
2011-08-03 08:25:10 +02:00
Jaime Torres
26a492eb4a reduce the scope of two variables
reduce the scope of two variables

REVIEW: 102057
2011-08-02 17:26:21 +02:00
Philipp Knechtges
afe8048afd kwin: optimizing the blur effect
This patch adds the capability to draw blurred region top to bottom using
paintSimpleScreen.

REVIEW: 101898
2011-07-14 14:20:56 +02:00
Script Kiddy
976f396fc7 SVN_SILENT made messages (.desktop file) 2011-07-06 10:41:48 +02:00
Script Kiddy
3d0c81f121 SVN_SILENT made messages (.desktop file) 2011-05-17 10:49:34 +02:00
Fredrik Höglund
6bc8cb93da kwin/blur: Pack varyings in the GLSL shader
Pack two vec2 coordinates in each vec4 varying. This gives
a ~60% improvement in shader performance with R600G.
2011-05-15 21:25:34 +02:00
Fredrik Höglund
93dc4d459c kwin/blur: Don't blur anything when we're painting top-to-bottom 2011-05-14 18:26:21 +02:00
Fredrik Höglund
b1990eec75 kwin/blur: Refactor the tests in drawWindow()
Move the tests into a separate function to improve readability.
2011-05-14 18:22:38 +02:00
Script Kiddy
9d7c88d288 SVN_SILENT made messages (.desktop file) 2011-05-11 09:17:09 +02:00
Script Kiddy
cb2597dcaf SVN_SILENT made messages (.desktop file) 2011-05-09 09:32:40 +02:00
Fredrik Höglund
ff889337e2 kwin/blur: Use pos() instead of geometry().topLeft() 2011-05-08 12:05:22 +02:00
Fredrik Höglund
9a08f99958 kwin/blur: Fix a regression from a6bdff71
Subtract the screen-relative contents rect of the window from
the paint region, not the window relative rect.
2011-05-08 11:58:33 +02:00
Fredrik Höglund
65025071fc kwin/blur: Optimize the paint region
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.
2011-05-02 02:06:18 +02:00
Fredrik Höglund
7ef8f444f6 kwin/blur: Disable by default on all Intel chipsets 2011-05-02 02:06:17 +02:00
Martin Gräßlin
818a936e99 Only use GLSL blur shader if ShaderManager is valid 2011-04-29 16:44:48 +02:00
Martin Gräßlin
d647950ff0 Do not blur behind EffectFrames with no style 2011-04-27 14:52:04 +02:00
Script Kiddy
25fd8bd0d3 SVN_SILENT made messages (.desktop file) 2011-03-31 07:42:47 +02:00