Commit graph

27 commits

Author SHA1 Message Date
Martin Gräßlin
728f333e6a Only use GLSL shader for lanczosfilter if ShaderManager is valid 2011-04-29 16:44:48 +02:00
Thomas Lübking
fab764f6c6 only use lanczos filter when either direction is scaled below 90%
BUG: 263653
2011-04-25 21:42:29 +02: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
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
0827c2903b Use GLPlatform to decide whether shaders are supported
Dropping the static methods from GLShader and use supports()
where it was used before.
2011-02-19 11:08:43 +01:00
Fredrik Höglund
73be6657ea kwin: Replace brightness and opacity with a modulation constant
This makes it possible to adjust both brightness and opacity
at the same time with one multiplication in the fragment shader.
2011-02-12 01:45:38 +01:00
Fredrik Höglund
2fa966e0f9 kwin: Use the new setUniform() overloads in kwin core 2011-02-10 19:37:51 +01:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Fredrik Höglund
1a5b3b4bea Disable and delete the fragment program if it fails to compile.
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215777
2011-01-30 15:25:01 +01:00
Fredrik Höglund
bfa2fc68e6 Rewrite the ARB lanczos shader to work with the Radeon R300 limitations.
svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215505
2011-01-30 15:11:22 +01:00
Fredrik Höglund
1a93cc40d2 Disable the lanczos filter with the Intel driver in Mesa 7.10.
It's reported to cause kwin to hang when rendering thumbnails.

svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215502
2011-01-30 15:07:41 +01:00
Martin Gräßlin
a6de13e2f7 Use ShaderManager to bind the shader in Lanczos. 2011-01-30 14:12:06 +01:00
Martin Gräßlin
78c4c7a86e Lanczos filter available in GLES.
It uses a default vertex shader, so the existing shader can be dropped.
2011-01-30 14:12:04 +01:00
Martin Gräßlin
c6dd3690f5 Don't clip when rendering to FBO. 2011-01-30 14:12:04 +01:00
Martin Gräßlin
14522ebecb Fix Linker error with Lanczos filter 2011-01-30 14:11:56 +01:00
Martin Gräßlin
b145ad6065 Lanczos not available in ES 2011-01-30 14:11:56 +01:00
Thomas Lübking
4cf251436f exclude non opaque (NOT "non ARGB") windows from lanczos filter unless we've a working blendfunction for the cached texture
BUG: 258439

svn path=/trunk/KDE/kdebase/workspace/; revision=1207826
2010-12-19 21:32:02 +00:00
Thomas Lübking
029f93127f kick trilinear filtering if favor of the lanczos filter (now default, unless blacklisted)
make the scale method configurable and align the UI for GL and Xrender

CCBUG: 243181


svn path=/trunk/KDE/kdebase/workspace/; revision=1195698
2010-11-11 19:53:19 +00:00
Martin Gräßlin
6270b502ba ARB Shader fallback to Lanczos filter.
This allows using Lanczos filter also on systems not supporting GLSL.
See http://svn.reviewboard.kde.org/r/5777/

svn path=/trunk/KDE/kdebase/workspace/; revision=1195273
2010-11-10 18:25:40 +00:00
Thomas Lübking
4db74f544d workaround nvidia issues with the texture cache and translucent windows
svn path=/trunk/KDE/kdebase/workspace/; revision=1195268
2010-11-10 18:08:46 +00:00
Martin Gräßlin
3e689ff201 Cache generated Lanczos textures.
This provides a significant performance improvement especially for Present Windows.
Whenever a lanczos resampling is done the resulted texture is cached, till the
window is damaged or a texture of different size is required. This means that
for a taskbar thumbnail the resampling only occurs once unless the window is damaged
and for present windows it only occurs when the windows are resized and then only
after the windows have already been moved. Highlighting windows does not cause
a resampling any more.
See review request http://svn.reviewboard.kde.org/r/5708/

svn path=/trunk/KDE/kdebase/workspace/; revision=1191874
2010-11-01 10:46:11 +00:00
Fredrik Höglund
119c06e403 Make the lanczos shader use a fixed number of iterations in the loop.
This makes it possible for the GLSL compiler to unroll it, which also
avoids the need to use relative addressing. With this change the shader
should hopefully work with the R300G driver.

The unused kernel weights are set to zero so they don't contribute
to the end result.

Thanks to Tom Stellard and Marek Olšák for their suggestions on how
to solve this problem.

CCBUG: 243191

svn path=/trunk/KDE/kdebase/workspace/; revision=1175021
2010-09-13 22:03:21 +00:00
Martin Gräßlin
a16f7f0672 Only use lanczos if the window size does not exceed the FBO size.
svn path=/trunk/KDE/kdebase/workspace/; revision=1169481
2010-08-29 11:27:57 +00:00
Martin Gräßlin
f359d19a90 Don't crop away the decoration shadows in the lanczos filter.
svn path=/trunk/KDE/kdebase/workspace/; revision=1160557
2010-08-08 09:59:03 +00:00
Martin Gräßlin
4111a9f051 Support for adding a driver blacklist to be used in the lanczos filter and blur effect.
It uses a new config group Blacklist in kwinrc with two subgroups for Lanczos and Blur.
The key of each entry in the group referrences the vendor either using GL_VENDOR or GL_RENDERER, e.g. "Intel" in renderer for Intel based chips.
The value of the entries is a stringlist containing exactly the renderer information. This way it is possible to blacklist several mesa driver versions which are buggy.
The blacklist is currently empty and will be filled with a kconf update script (which could also be done by distributions). So all users who experience problems and are subscribed to the bugs receiving this message, please upload your glxinfo.
An example for a blacklist:
[Blacklist][Lanczos]
NVIDIA=GeForce 9400M/PCI/SSE2

CCBUG: 243181
CCBUG: 242985

svn path=/trunk/KDE/kdebase/workspace/; revision=1146195
2010-07-05 13:42:34 +00:00
Martin Gräßlin
c705dd474e add missing ifdefs to make the code compile if OpenGL is not present
svn path=/trunk/KDE/kdebase/workspace/; revision=1137402
2010-06-12 16:43:25 +00:00
Martin Gräßlin
191435d425 Move Lanczos filter from taskbarthumbnail effect into the scene and use it also in boxswitch, presentwindows and thumbnailaside effects.
svn path=/trunk/KDE/kdebase/workspace/; revision=1133901
2010-06-02 20:04:54 +00:00