Commit graph

17 commits

Author SHA1 Message Date
Martin Gräßlin
b366f0ac01 Use shader traits API for lanczos filter's shader 2016-01-25 14:11:54 +01:00
Martin Gräßlin
0cbc79193b Do not use stackingOrder in LanczosFilter to get all EffectWindows
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
2013-04-11 12:57:53 +02:00
Martin Gräßlin
98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00
Martin Gräßlin
c3ec860a72 Drop ARB shader code path from Lanczos Filter
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
2013-03-12 08:48:37 +01:00
Martin Gräßlin
533d57da60 Mark most ctors as explicit as reported by Krazy2 checker 2013-01-02 18:35:46 +01:00
Martin Gräßlin
987bc837d9 Remove define KWIN_HAVE_OPENGL_COMPOSITING
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.
2011-08-13 16:46:43 +02:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +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
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
14522ebecb Fix Linker error with Lanczos filter 2011-01-30 14:11:56 +01:00
Anselmo Melo
f3a34bd72a Fix build errors when configured without openGL
Changes and introduces some '#ifdef KWIN_HAVE_OPENGL_COMPOSITING'
http://svn.reviewboard.kde.org/r/5903/


svn path=/trunk/KDE/kdebase/workspace/; revision=1198802
2010-11-19 20:14:03 +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
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
Andreas Hartmetz
72fb0824ef Also compile *with* OpenGL present; include the file that supplies KWIN_HAVE_OPENGL_COMPOSITING.
svn path=/trunk/KDE/kdebase/workspace/; revision=1137417
2010-06-12 18:33:49 +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