Commit graph

48 commits

Author SHA1 Message Date
Thomas Lübking
12358f839a no VBO upload for zero vertex count
causes out of bounds segfault

BUG: 347900
REVIEW: 123865
FIXED-IN: 5.3.1
2015-05-21 09:42:29 +02:00
Fredrik Höglund
4d738b86ea Add an internalFormat parameter to the GLTexture ctor
This parameter is ignored on GLES.
2014-12-30 21:19:49 +01:00
Martin Gräßlin
bf4ba54647 Remove displayWidth and displayHeight from the compositor
Instead of getting size from displayWidth() and displayHeight() use
the information we have from Screens. This means there is only one
place to have the information and by that we can ensure that all
components use the same data to rely on. displayWidth/displayHeight
seem to provide the wrong information when unplugging an output
without disabling the output. This results in rendering artefacts.
But KWin::Screens has the correct information available.
2014-11-27 09:00:19 +01:00
Fredrik Höglund
edb0751cba Remove the NPOT texture support checks
We require OpenGL 2.0 which always supports NPOT textures.
2014-11-22 15:53:15 +01:00
Martin Gräßlin
8919cd5f54 [effects] Simplify supported check in blur and backgroundcontrast
GLSL is always required nowadays on GL compositor.

REVIEW: 118642
2014-06-11 14:50:01 +02:00
Martin Gräßlin
4a1bc2ec96 [effects] Drop the .desktop files for the BuiltIn Effects
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
2014-04-28 13:52:43 +02:00
l10n daemon script
e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
l10n daemon script
f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script
69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
Martin Gräßlin
651ea9f374 [blur|contrast] Explicitly check for openglCompositing in ::supported()
Ensures that the further checks are not performed on XRender compositing.

REVIEW: 117497
2014-04-11 08:36:43 +02:00
l10n daemon script
e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script
eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
Martin Gräßlin
3bbc9436db [kwin] Add a virtual Effect::requestedEffectChainPosition
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.

Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
2014-03-28 14:04:54 +01:00
Martin Gräßlin
1ab37878cd [kwin] Port remaining XLib usage in effects to XCB
Affected effects
* Blur and Contrast Shader to get atom name
* Glide effect for the slide atom
* startupfeedback for cursor size - read from config now and cached
* showfps used an xsync, replaced by flush
* logout effect for creating hack items

REVIEW: 116828
2014-03-26 13:56:21 +01:00
l10n daemon script
10f89d6019 SVN_SILENT made messages (.desktop file) 2014-03-24 04:35:26 +00:00
l10n daemon script
07a5088f42 SVN_SILENT made messages (.desktop file) 2014-03-18 05:07:11 +00:00
l10n daemon script
5e5b1100b2 SVN_SILENT made messages (.desktop file) 2014-03-17 04:41:37 +00:00
l10n daemon script
2242efeb06 SVN_SILENT made messages (.desktop file) 2014-03-13 04:46:24 +00:00
l10n daemon script
9b402662b5 SVN_SILENT made messages (.desktop file) 2014-03-11 05:14:45 +00:00
Martin Gräßlin
c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
Martin Gräßlin
3f0ff9b8d5 Migrate effects from displayWidth()/displayHeight() to virtualScreenSize()/virtualScreenGeometry()
Rational behind this change is that displayWidth and displayHeight are
X specific API calls in kwinglobals. For the future it's easier to only
rely on functionality which goes through the EffectsHandler API which
allows easier adjustments in KWin core.

displayWidth() and displayHeight() are only used to get the size or the
complete rect of all screens. This is also provided by:

effects->virtualScreenGeometry() or
effects->virtualScreenSize()

REVIEW: 116021
2014-03-07 08:01:44 +01:00
l10n daemon script
b7a029619b SVN_SILENT made messages (.desktop file) 2014-03-03 04:35:02 +00:00
l10n daemon script
9c8800249a SVN_SILENT made messages (.desktop file) 2014-02-24 04:38:53 +00:00
l10n daemon script
8acdbff8cc SVN_SILENT made messages (.desktop file) 2014-02-23 04:50:11 +00:00
l10n daemon script
31d0cc055b SVN_SILENT made messages (.desktop file) 2014-02-22 04:23:30 +00:00
l10n daemon script
a8ec2b8bf3 SVN_SILENT made messages (.desktop file) 2014-02-19 05:16:00 +00:00
l10n daemon script
6f8c3dd771 SVN_SILENT made messages (.desktop file) 2014-02-18 05:12:30 +00:00
l10n daemon script
0212b9d185 SVN_SILENT made messages (.desktop file) 2014-02-06 04:11:22 +00:00
Martin Gräßlin
c954a3151c [kwin] Remove another useless kdebug include 2014-02-03 11:40:16 +01:00
Martin Gräßlin
f4597a3552 [kwin] Drop unused includes to KDebug 2014-02-03 11:36:46 +01:00
l10n daemon script
7f7fc12a05 SVN_SILENT made messages (.desktop file) 2014-02-02 04:21:17 +00:00
l10n daemon script
c96df87475 SVN_SILENT made messages (.desktop file) 2014-01-30 04:16:08 +00:00
l10n daemon script
1000f99072 SVN_SILENT made messages (.desktop file) 2014-01-29 04:18:42 +00:00
l10n daemon script
253c2dab5a SVN_SILENT made messages (.desktop file) 2014-01-27 04:08:32 +00:00
l10n daemon script
e12bd6cffc SVN_SILENT made messages (.desktop file) 2014-01-26 04:10:18 +00:00
l10n daemon script
0ee6e4b422 SVN_SILENT made messages (.desktop file) 2014-01-25 03:39:46 +00:00
l10n daemon script
e33092cce3 SVN_SILENT made messages (.desktop file) 2014-01-24 21:04:18 +00:00
Martin Gräßlin
76efe517a7 Turn built-in effects into a library kwin links against
As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects

All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.

During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.

Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.

[1] QElapsedTimer around the loading code, start kwin five times, take
average.

REVIEW: 115073
2014-01-24 14:13:59 +01:00
Martin Gräßlin
daf0772c35 [kwin/backgroundcontrast] Fix shader on GLSL 1.10 code path
We need to use the varying_in/out variables, the code was a little
bit too modern.

At the same time remove the identity matrix and replace it by mat4(1.0).

Note: the shader should probably go into glsl files as they are not
really generated.
2014-01-23 15:44:12 +01:00
Marco Martin
f2acaa2826 remove connect to nonexisting signal
slotWindowDeleted is not here anymore
2014-01-23 15:18:45 +01:00
Marco Martin
b7ded05596 fade out the effect if the window opacity is < 1 2014-01-23 14:47:49 +01:00
Marco Martin
65c3c4c1b4 remove paintEffectFrame implementation, add a FIXME 2014-01-23 14:47:49 +01:00
Marco Martin
3d9ddb0cf2 correctly take the matrix of floats
* use the atom, not XA_cardinal
* we never do this effect behind the decoration
2014-01-23 14:47:22 +01:00
Marco Martin
210f7d3eff reintroduce prepaintscreen
* work also without blur enabled
* try to pass only the 3 color parameters
2014-01-23 14:47:01 +01:00
Marco Martin
dabafc4988 simplify: remove prepaintwindow/screen
* update effect name
* remove unused variable
2014-01-23 14:46:13 +01:00
Marco Martin
4f2d2e469d no subclass for the shader
* get rid of the strength property
* this effect doesn't have config
2014-01-23 14:45:40 +01:00
Marco Martin
4036f179fc one single pass, get rid of cached version
* this effect is way cheaper than blur, don't cache it
* use its own atom
* also pass the matrix in the x property
* remove remnants of the cache
* do just a single pass
* get rid of config ui remnants
2014-01-23 14:44:49 +01:00
Marco Martin
3a4eb9a093 stub for the background contrast effect
* a copy of the blur shader to become a copy of the background contrast effect
* contrastshader actually doing the light modification
* don't expand/shrink the area
2014-01-23 14:44:00 +01:00