Commit graph

14047 commits

Author SHA1 Message Date
Martin Gräßlin
5f15528428 [effects] Remove clip plane from Cube effect
It broke the rendering of the reflection.
2016-02-01 08:43:25 +01:00
Martin Gräßlin
613d76f2df [effects] Combine all shaders in resources
One resource is used for shader version 1.10 and one for version 1.40.

The ideas behind this change is to remove the locating of the shader
sources and also to fix that user provided shaders could be loaded
instead of the original ones (possible attack vector on Wayland).

To simplify the ShaderManager provides a new method call to load the
shader from the resource. This means the effects don't need to
duplicate the check for the shader version any more and also don't
need to duplicate the file reading functionality.

REVIEW: 126905
2016-02-01 08:42:30 +01:00
Martin Gräßlin
fbf14306d7 Set Workspace::m_compositor to null when Compositor gets destroyed
Fixes regression from 1998d5ac1a.

BUG: 358722
REVIEW: 126925
2016-02-01 08:31:13 +01:00
l10n daemon script
bd3083e81f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-01-30 09:40:55 +00:00
Martin Gräßlin
757523a324 Use kwinApp()->config() instead of KSharedConfig::openConfig()
That way all over kwin we can inject a custom config in the autotests.
2016-01-29 11:24:18 +01:00
Martin Gräßlin
a12fb5ed03 [autotest] Extend QuickTilingTest for keyboard window move
Trigger quick tiling by moving the window. For moving the window only
keyboard keys are used.

The test experienced some problems with the Outline triggering crashes.
To work around them the test disables the Outline by specifying an
invalid configuration.
2016-01-29 09:54:07 +01:00
Martin Gräßlin
bdb423da3d Only send key press events to the moving client
The invoked method is called keyPressEvent, thus it should not get
key release events. Before each key event was handled twice.
2016-01-29 09:52:01 +01:00
Martin Gräßlin
2a935c523f Make QmlPath in Outline configurable
Fixes a TODO in the code and has the slight advantage that we can
disable the Outline from integration tests by pointing to a not
existing file.
2016-01-29 09:50:52 +01:00
Martin Gräßlin
1f7daa934d KWin::Application holdes a KSharedConfigPtr with the config
This allows the integration tests to provide their own configuration
as they need it. Setting the configuration should be done before
invoking start()
2016-01-29 09:48:02 +01:00
Aleix Pol
2636aad5c3 Let KDE*CompilerSettings change the policies in the project
As suggested in ECM documentation.
2016-01-28 15:08:23 +01:00
Martin Gräßlin
54870d5e14 [libkwinglutils] Cleanup Shader API: removal of ShaderType
As all effects are ported to the ShaderTraits API the old ShaderType
API can be completely removed.
2016-01-26 09:42:49 +01:00
Martin Gräßlin
1752302203 [effects] Use passed through matrix in Blur Effect
The blur effect so far calculated a custom model view projection matrix.
This is not needed as we have the current projection matrix available in
WindowPaintData and EffectFrame.

REVIEW: 126215
2016-01-25 15:36:10 +01:00
Martin Gräßlin
2e7bc0df87 [kwineffects] Pass screen projection matrix to EffectFrame
Exposes the current screen projection matrix in the render pass of
the EffectFrame, so that effects can make use of it.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
ef7f7b0179 [kwinglutils] Don't setup old shader API for rendering a texture
Old shader API no longer in use, so we don't need to setup the texture
rendering.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
84b73ab2b3 Drop remaining old shader API usage from SceneOpenGL
No effect uses old API, so we don't need to setup the old shaders
any more.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
67d79385cf [effects] Drop resetting GenericShader from cube effect
The cube effect no longer modifies any aspects of the GenericShader,
thus there is no need to reset any values.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
b258dc53b3 [effects] Change sphere to use shader traits variant 2016-01-25 14:11:54 +01:00
Martin Gräßlin
318fb6989b [effects] Change cylinder to shader traits variant 2016-01-25 14:11:54 +01:00
Martin Gräßlin
6e35aded0b [effects] Adjust Cube to use shader traits shader for window rendering
Main change is that the rotation for each face of the cube is now
done through a QMatrix4x4 instead of specifying through ScreenPaintData.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
b366f0ac01 Use shader traits API for lanczos filter's shader 2016-01-25 14:11:54 +01:00
Martin Gräßlin
99739106d1 Use shader traits API to render cached texture in lanczos filter 2016-01-25 14:11:54 +01:00
Martin Gräßlin
2f5de22ac8 [effects] Use shader traits API in logout blur 2016-01-25 14:11:54 +01:00
Martin Gräßlin
af67391710 [effects] Use shader traits API for vignetting in Logout 2016-01-25 14:11:54 +01:00
Martin Gräßlin
9aeb2f7907 [effects] Use shader traits API for lookingglass
In the long run this effect needs to be modified. Rendering the complete
scene to an FBO is not the best approach.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
18a15a59d5 [effects] Fix reflections in coverswitch
Got broken due to switch to Shader Traits API.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
a5e86c66bf [effects] Use shader traits for CoverSwitch reflection shader 2016-01-25 14:11:54 +01:00
Martin Gräßlin
9fcedcc2f8 [effects] Use shader traits in Resize 2016-01-25 14:11:54 +01:00
Martin Gräßlin
5c59f4261b [effects] Use shader traits API for reflection shader 2016-01-25 14:11:54 +01:00
Martin Gräßlin
6bdef479a9 [effects] Use shader traits API for CubeCap shader 2016-01-25 14:11:54 +01:00
Martin Gräßlin
712e46e468 [effects] Port startupfeedback to shader trait api
The blinking shader is adjusted to use a shader trait vertex shader
and gets generated with a shader trait variant.

Overall the code is simplified to ensure that we always have a shader
bound with the correct mvp matrix when rendering the icon.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
f13622a914 [effects] Use shader traits generated shader for invert effect
Source code needs minor adjustment to be compatible with the shader
traits variable naming.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
7facdb67ee [effects] Simplify setting mvp matrix for cursor in zoom effect
Now that we pass the projection matrix with screen paint data we
don't need to calculate our own matrix.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
4e8e0f817f [effects] Drop resetting Generic Shader from zoom effect
No longer needed as during the rendering the Generic Shader is not
used any more. So the zoom effect doesn't affect it.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
4b96370e67 [effects] Use shader traits API in trackmouse 2016-01-25 14:11:54 +01:00
Martin Gräßlin
a09ede8cc9 [effects] Use shader traits API to render wallpaper in cube effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin
8d9321ca4c [effects] Use shader traits api in screenedge effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin
700adad9b1 [effects] Use shader traits API for MouseMark effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin
2add89e274 [effects] Use shader trait api in MouseClick 2016-01-25 14:11:54 +01:00
Martin Gräßlin
ff9ffe77ba [effects] Use color shader traits in magnifier effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin
6aa19b1587 [effects] Use shader traits in SnapHelper effect
To simplify rendering is moved from postPaintScreen to paintScreen.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
2de0b527d0 [effects] Use shader traits in ShowPaint effect 2016-01-25 14:11:54 +01:00
Martin Gräßlin
b757b7e17d [effects] Switch ShowFPS to ShaderTraits based rendering 2016-01-25 14:11:54 +01:00
Martin Gräßlin
d76f08e359 Render effect frame with shader trait API 2016-01-25 14:11:54 +01:00
Martin Gräßlin
0d1da1c583 Always set mvp on shader in SceneOpenGL2Window::performPaint
Makes it possible to pass in a shader with a custom fragment shader,
but a normal vertex shader which needs the mvp matrix to be set.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
4b11b7b6b8 [kwineffects] Add a generateCustomShader to ShaderManager
This method allows to generate a shader with ShaderTraits but one
part (e.g. vertex and/or fragment) to be replaced by custom shader
code.

Thus it can be used as a replacement for the load*(ShaderType) variants
and allows more effects to transition to shaders using traits.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
3be6ff9f12 [kwineffects] Pass screen projection matrix to WindowPaintData
The screen projection matrix is needed if an effect wants to customize
the modelview projection matrix while rendering a window and keeping
the currently applied screen projection and transformation.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
f284ef814c Pass projection matrix to ScreenPaintData
With this change a new ctor overload is added to ScreenPaintData
which allows passing a projection matrix through the effects. This
allows effects to put up custom shaders with a shared projection matrix
and without having to calculate it themselves.

The projection matrix is a read-only information for the effects. There
is no way to change or overwrite it.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
5657405d32 Use ShaderTraits based shader for paint background
Little bit less usage of old Shader API.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
ad7246e010 Create the new projection matrix at start of frame rendering
For both simple and generic rendering the projection is actually the
same. So let's create it at the start of the frame rendering which
allows us to also pass it through the effects.
2016-01-25 14:11:54 +01:00
Martin Gräßlin
778a7fd1a0 [kwinglutils] Add a ShaderTraits variant to ShaderBinder
Simplifies binding a Shader with traits.
2016-01-25 14:11:54 +01:00